Skip to content

Commit b197e1f

Browse files
committed
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 --HG-- extra : moz-landing-system : lando
1 parent fa23513 commit b197e1f

File tree

276 files changed

+404
-19237
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

276 files changed

+404
-19237
lines changed

accessible/generic/Accessible.cpp

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -116,15 +116,10 @@ Accessible::Accessible(nsIContent* aContent, DocAccessible* aDoc)
116116
mHideEventTarget(false) {
117117
mBits.groupInfo = nullptr;
118118
mInt.mIndexOfEmbeddedChild = -1;
119-
120-
// Assign an ID to this Accessible for use in UniqueID().
121-
recordreplay::RegisterThing(this);
122119
}
123120

124121
Accessible::~Accessible() {
125122
NS_ASSERTION(!mDoc, "LastRelease was never called!?!");
126-
127-
recordreplay::UnregisterThing(this);
128123
}
129124

130125
ENameValueFlag Accessible::Name(nsString& aName) const {

accessible/generic/Accessible.h

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -172,15 +172,7 @@ class Accessible : public nsISupports {
172172
/**
173173
* Return the unique identifier of the accessible.
174174
*/
175-
void* UniqueID() {
176-
// When recording or replaying, use an ID which will be consistent when
177-
// recording/replaying (pointer values are not consistent), so that IPC
178-
// messages from the parent process can be handled when replaying.
179-
if (recordreplay::IsRecordingOrReplaying()) {
180-
return reinterpret_cast<void*>(recordreplay::ThingIndex(this));
181-
}
182-
return static_cast<void*>(this);
183-
}
175+
void* UniqueID() { return static_cast<void*>(this); }
184176

185177
/**
186178
* Return language associated with the accessible.

devtools/client/framework/test/browser_toolbox_options_disable_buttons.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ async function testToggleToolboxButtons() {
125125
];
126126

127127
// Filter out all the buttons which are not supported on the current target.
128-
// (WebReplay, DevTools Fission Preferences etc...)
128+
// (DevTools Fission Preferences etc...)
129129
const target = await TargetFactory.forTab(gBrowser.selectedTab);
130130
const toolbarButtons = toolbox.toolbarButtons.filter(tool =>
131131
tool.isTargetSupported(target)

devtools/client/shared/test/test-actor.js

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@ const {
2020
getCSSStyleRules,
2121
} = require("devtools/shared/inspector/css-logic");
2222
const InspectorUtils = require("InspectorUtils");
23-
const Debugger = require("Debugger");
2423

2524
// Set up a dummy environment so that EventUtils works. We need to be careful to
2625
// pass a window object into each EventUtils method we call rather than having
@@ -502,13 +501,6 @@ var TestActor = (exports.TestActor = protocol.ActorClassWithSpec(testSpec, {
502501
* Get the window which mouse events on node should be delivered to.
503502
*/
504503
windowForMouseEvent: function(node) {
505-
// When replaying, the node is a proxy for an element in the replaying
506-
// process. Use the window which the server is running against, which is
507-
// able to receive events. We can't use isReplaying here because this actor
508-
// is loaded into its own sandbox.
509-
if (Debugger.recordReplayProcessKind() == "Middleman") {
510-
return this.targetActor.window;
511-
}
512504
return node.ownerDocument.defaultView;
513505
},
514506

docshell/base/timeline/TimelineConsumers.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ namespace mozilla {
1515

1616
NS_IMPL_ISUPPORTS(TimelineConsumers, nsIObserver);
1717

18-
StaticMutexNotRecorded TimelineConsumers::sMutex;
18+
StaticMutex TimelineConsumers::sMutex;
1919

2020
// Manually manage this singleton's lifetime and destroy it before shutdown.
2121
// This avoids the leakchecker detecting false-positive memory leaks when

docshell/base/timeline/TimelineConsumers.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ class TimelineConsumers : public nsIObserver {
122122
LinkedList<MarkersStorage> mMarkersStores;
123123

124124
// Protects this class's data structures.
125-
static StaticMutexNotRecorded sMutex;
125+
static StaticMutex sMutex;
126126
};
127127

128128
} // namespace mozilla

dom/base/TabGroup.cpp

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -107,11 +107,6 @@ TabGroup* TabGroup::GetFromWindow(mozIDOMWindowProxy* aWindow) {
107107
TabGroup* TabGroup::GetFromActor(BrowserChild* aBrowserChild) {
108108
MOZ_RELEASE_ASSERT(NS_IsMainThread());
109109

110-
// Middleman processes do not assign event targets to their tab children.
111-
if (recordreplay::IsMiddleman()) {
112-
return GetChromeTabGroup();
113-
}
114-
115110
nsCOMPtr<nsIEventTarget> target =
116111
aBrowserChild->Manager()->GetEventTargetFor(aBrowserChild);
117112
if (!target) {

dom/base/nsContentUtils.cpp

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -249,7 +249,6 @@
249249
#include "mozilla/HangAnnotations.h"
250250
#include "mozilla/Encoding.h"
251251
#include "nsXULElement.h"
252-
#include "mozilla/RecordReplay.h"
253252
#include "nsThreadManager.h"
254253
#include "nsIBidiKeyboard.h"
255254
#include "ReferrerInfo.h"
@@ -9905,12 +9904,6 @@ uint64_t nsContentUtils::GenerateProcessSpecificId(uint64_t aId) {
99059904
MOZ_RELEASE_ASSERT(id < (uint64_t(1) << kIdBits));
99069905
uint64_t bits = id & ((uint64_t(1) << kIdBits) - 1);
99079906

9908-
// Set the high bit for middleman processes so it doesn't conflict with the
9909-
// content process's generated IDs.
9910-
if (recordreplay::IsMiddleman()) {
9911-
bits |= uint64_t(1) << (kIdBits - 1);
9912-
}
9913-
99149907
return (processBits << kIdBits) | bits;
99159908
}
99169909

dom/base/nsFrameMessageManager.cpp

Lines changed: 0 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,6 @@
5252
#include "mozilla/dom/ipc/StructuredCloneData.h"
5353
#include "mozilla/dom/DOMStringList.h"
5454
#include "mozilla/jsipc/CrossProcessObjectWrappers.h"
55-
#include "mozilla/recordreplay/ParentIPC.h"
5655
#include "nsPrintfCString.h"
5756
#include "nsXULAppAPI.h"
5857
#include "nsQueryObject.h"
@@ -594,35 +593,11 @@ class MMListenerRemover {
594593
RefPtr<nsFrameMessageManager> mMM;
595594
};
596595

597-
// When recording or replaying, return whether a message should be received in
598-
// the middleman process instead of the recording/replaying process.
599-
static bool DirectMessageToMiddleman(const nsAString& aMessage) {
600-
// Middleman processes run developer tools server code and need to receive
601-
// debugger related messages. The session store flush message needs to be
602-
// received in order to cleanly shutdown the process.
603-
return (StringBeginsWith(aMessage, NS_LITERAL_STRING("debug:")) &&
604-
recordreplay::parent::DebuggerRunsInMiddleman()) ||
605-
aMessage.EqualsLiteral("SessionStore:flush");
606-
}
607-
608596
void nsFrameMessageManager::ReceiveMessage(
609597
nsISupports* aTarget, nsFrameLoader* aTargetFrameLoader, bool aTargetClosed,
610598
const nsAString& aMessage, bool aIsSync, StructuredCloneData* aCloneData,
611599
mozilla::jsipc::CpowHolder* aCpows, nsIPrincipal* aPrincipal,
612600
nsTArray<StructuredCloneData>* aRetVal, ErrorResult& aError) {
613-
// If we are recording or replaying, we will end up here in both the
614-
// middleman process and the recording/replaying process. Ignore the message
615-
// in one of the processes, so that it is only received in one place.
616-
if (recordreplay::IsRecordingOrReplaying()) {
617-
if (DirectMessageToMiddleman(aMessage)) {
618-
return;
619-
}
620-
} else if (recordreplay::IsMiddleman()) {
621-
if (!DirectMessageToMiddleman(aMessage)) {
622-
return;
623-
}
624-
}
625-
626601
MOZ_ASSERT(aTarget);
627602

628603
nsAutoTObserverArray<nsMessageListenerInfo, 1>* listeners =

dom/base/nsJSEnvironment.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -530,8 +530,7 @@ class ScriptErrorEvent : public Runnable {
530530
JS::Rooted<JSObject*> stackGlobal(rootingCx);
531531
xpc::FindExceptionStackForConsoleReport(win, mError, mErrorStack, &stack,
532532
&stackGlobal);
533-
mReport->LogToConsoleWithStack(stack, stackGlobal,
534-
JS::ExceptionTimeWarpTarget(mError));
533+
mReport->LogToConsoleWithStack(stack, stackGlobal);
535534
}
536535

537536
return NS_OK;

0 commit comments

Comments
 (0)