Closed Bug 1521052 Opened 4 years ago Closed 4 years ago

DebuggerServer is never destroyed in the content process


(DevTools :: Framework, enhancement, P2)



(firefox66 fixed)

Firefox 66
Tracking Status
firefox66 --- fixed


(Reporter: ochameau, Assigned: ochameau)


(Blocks 1 open bug)



(2 files)

We are instantiating a DebuggerServer from the main frame script here:
That we never ever try to destroy/cleanup.
It means that if we close the toolbox, the server is still around and may hold various objects alive, especially if actors are not cleaned up correctly.

And actually, the same also apply to the loader we create a few lines before, but that would be yet another level of cleanup.

In bug 1515290, I'm hitting this issue by having a test that report leaks on try, because we don't cleanup the server and leak objects indirectly from it.

We never really tried to cleanup the DebuggerServer and so a few tests require some tweaks
to acknowledge that once the last connection drop (typically, we close the toolbox or target),
the server is destroyed and dynamically registered actors are also destroyed.

I think it is great to consider that everything is cleaned up as we may followup to destroy
the whole loader.

Depends on D16961

Priority: -- → P2
Pushed by
Add DebuggerServer.hasConnection to track if it still has active connections. r=jdescottes
Destroy DebuggerServer in the content process when the last connection drops. r=jdescottes
Closed: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 66
Depends on: 1528276
You need to log in before you can comment on or make changes to this bug.