Bug 1583447 - Fix BrowserConsole "this._debuggerSourcesSeen is null". r=jdescottes

Differential Revision: https://phabricator.services.mozilla.com/D46988

--HG--
extra : moz-landing-system : lando
This commit is contained in:
Jason Laster 2019-10-01 06:46:37 +00:00
parent 730e9ad9d9
commit b398214772

View File

@ -167,16 +167,6 @@ const ThreadActor = ActorClassWithSpec(threadSpec, {
get dbg() {
if (!this._dbg) {
this._dbg = this._parent.dbg;
this._dbg.uncaughtExceptionHook = this.uncaughtExceptionHook;
this._dbg.onDebuggerStatement = this.onDebuggerStatement;
this._dbg.onNewScript = this.onNewScript;
this._dbg.onNewDebuggee = this._onNewDebuggee;
if (this._dbg.replaying) {
this._dbg.replayingOnForcedPause = this.replayingOnForcedPause.bind(
this
);
this._dbg.replayingOnPositionChange = this._makeReplayingOnPositionChange();
}
// Keep the debugger disabled until a client attaches.
this._dbg.enabled = this._state != "detached";
}
@ -342,6 +332,15 @@ const ThreadActor = ActorClassWithSpec(threadSpec, {
}
this._state = "attached";
this.dbg.uncaughtExceptionHook = this.uncaughtExceptionHook;
this.dbg.onDebuggerStatement = this.onDebuggerStatement;
this.dbg.onNewScript = this.onNewScript;
this.dbg.onNewDebuggee = this._onNewDebuggee;
if (this.dbg.replaying) {
this.dbg.replayingOnForcedPause = this.replayingOnForcedPause.bind(this);
this.dbg.replayingOnPositionChange = this._makeReplayingOnPositionChange();
}
this._debuggerSourcesSeen = new WeakSet();
Object.assign(this._options, options || {});