mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-25 05:41:12 +00:00
Bug 1665716 - [devtools] Listen to all resources only from one place in the debugger frontend. r=bomsy,nchevobbe
Differential Revision: https://phabricator.services.mozilla.com/D103876
This commit is contained in:
parent
f9e7f781e5
commit
3c74a1c5d5
@ -77,12 +77,6 @@ class DebuggerPanel {
|
||||
|
||||
registerStoreObserver(this._store, this._onDebuggerStateChange.bind(this));
|
||||
|
||||
const resourceWatcher = this.toolbox.resourceWatcher;
|
||||
await resourceWatcher.watchResources(
|
||||
[resourceWatcher.TYPES.ERROR_MESSAGE],
|
||||
{ onAvailable: actions.addExceptionFromResources }
|
||||
);
|
||||
|
||||
return this;
|
||||
}
|
||||
|
||||
@ -273,11 +267,6 @@ class DebuggerPanel {
|
||||
}
|
||||
|
||||
destroy() {
|
||||
const resourceWatcher = this.toolbox.resourceWatcher;
|
||||
resourceWatcher.unwatchResources([resourceWatcher.TYPES.ERROR_MESSAGE], {
|
||||
onAvailable: this._actions.addExceptionFromResources,
|
||||
});
|
||||
|
||||
this.panelWin.Debugger.destroy();
|
||||
this.emit("destroyed");
|
||||
}
|
||||
|
@ -57,6 +57,9 @@ export async function onConnect(
|
||||
await resourceWatcher.watchResources([resourceWatcher.TYPES.THREAD_STATE], {
|
||||
onAvailable: onBreakpointAvailable,
|
||||
});
|
||||
await resourceWatcher.watchResources([resourceWatcher.TYPES.ERROR_MESSAGE], {
|
||||
onAvailable: actions.addExceptionFromResources,
|
||||
});
|
||||
}
|
||||
|
||||
export function onDisconnect() {
|
||||
@ -71,6 +74,9 @@ export function onDisconnect() {
|
||||
resourceWatcher.unwatchResources([resourceWatcher.TYPES.THREAD_STATE], {
|
||||
onAvailable: onBreakpointAvailable,
|
||||
});
|
||||
resourceWatcher.unwatchResources([resourceWatcher.TYPES.ERROR_MESSAGE], {
|
||||
onAvailable: actions.addExceptionFromResources,
|
||||
});
|
||||
sourceQueue.clear();
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user