Bug 1609815 - Remove Web Replay C++ implementation. r=jgilbert,jandem,gbrown

Patch by bhackett and jlaster. Also reviewed by mccr8.

Differential Revision: https://phabricator.services.mozilla.com/D60197
This commit is contained in:
Andrew McCreight
2020-02-27 04:43:48 +00:00
parent 980cbab8e5
commit 179c12c3e5
276 changed files with 403 additions and 19236 deletions

View File

@@ -52,7 +52,6 @@
#include "mozilla/dom/ipc/StructuredCloneData.h"
#include "mozilla/dom/DOMStringList.h"
#include "mozilla/jsipc/CrossProcessObjectWrappers.h"
#include "mozilla/recordreplay/ParentIPC.h"
#include "nsPrintfCString.h"
#include "nsXULAppAPI.h"
#include "nsQueryObject.h"
@@ -594,35 +593,11 @@ class MMListenerRemover {
RefPtr<nsFrameMessageManager> mMM;
};
// When recording or replaying, return whether a message should be received in
// the middleman process instead of the recording/replaying process.
static bool DirectMessageToMiddleman(const nsAString& aMessage) {
// Middleman processes run developer tools server code and need to receive
// debugger related messages. The session store flush message needs to be
// received in order to cleanly shutdown the process.
return (StringBeginsWith(aMessage, NS_LITERAL_STRING("debug:")) &&
recordreplay::parent::DebuggerRunsInMiddleman()) ||
aMessage.EqualsLiteral("SessionStore:flush");
}
void nsFrameMessageManager::ReceiveMessage(
nsISupports* aTarget, nsFrameLoader* aTargetFrameLoader, bool aTargetClosed,
const nsAString& aMessage, bool aIsSync, StructuredCloneData* aCloneData,
mozilla::jsipc::CpowHolder* aCpows, nsIPrincipal* aPrincipal,
nsTArray<StructuredCloneData>* aRetVal, ErrorResult& aError) {
// If we are recording or replaying, we will end up here in both the
// middleman process and the recording/replaying process. Ignore the message
// in one of the processes, so that it is only received in one place.
if (recordreplay::IsRecordingOrReplaying()) {
if (DirectMessageToMiddleman(aMessage)) {
return;
}
} else if (recordreplay::IsMiddleman()) {
if (!DirectMessageToMiddleman(aMessage)) {
return;
}
}
MOZ_ASSERT(aTarget);
nsAutoTObserverArray<nsMessageListenerInfo, 1>* listeners =