Closed Bug 1577431 Opened 3 months ago Closed 3 months ago

Properly cleanup Browser Console when closing its window

Categories

(DevTools :: Console, defect, P1)

defect

Tracking

(firefox70 fixed)

RESOLVED FIXED
Firefox 70
Tracking Status
firefox70 --- fixed

People

(Reporter: nchevobbe, Assigned: nchevobbe)

References

(Blocks 1 open bug)

Details

(Whiteboard: dt-fission)

Attachments

(1 file)

We create a new DebuggerClient each time we open the Browser Console (devtools/client/webconsole/browser-console-manager.js#109 ), but it is never closed.

This blocks Bug 1572484, as we currently don't destroy the content target actors, which causes a memory leak in the test.

Blocks: 1572484

We store the created DebuggerClient when opening the Browser Console
so we can close it when closing the Browser Console window.
The Browser Console window unload event listener is moved out of
the BrowserConsole class to the BrowserConsoleManager, so we can close
the DebuggerClient when the window is closed (plus it makes more sense
to have it here since that's where we create the window).

Finally, functions that were inlined in toggleBrowserConsole are moved
as method of the BrowserConsoleManager for clarity.

Pushed by nchevobbe@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/9ba13ab83751
Cleanup Browser Console when closing its window. r=ochameau.
Status: ASSIGNED → RESOLVED
Closed: 3 months ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 70
You need to log in before you can comment on or make changes to this bug.