gecko-dev/devtools/server
Nick Fitzgerald 7b0a1f6dee Bug 1261869 - Fix leaks in devtools; r=ejpbruel
There are two leaks addressed in this commit:

1. The thread actor's `_debuggerSourcesSeen` set was never cleared. This set
exists only as a performance optimization to speed up `_addSource` in cases
where we've already added the source. Unfortunately, this set wasn't getting
cleared when we cleared debuggees out and it ended up keeping the
`Debugger.Source`, its referent, and transitively its referent's global alive. I
figured it was simpler to make it a `WeakSet` than to add it as a special case
in `ThreadActor.prototype._clearDebuggees` and manage the lifetimes by hand. I
think this fits well with its intended use as an ephemeral performance
optimization.

2. Due to a logic error, we were not clearing debuggees in the memory actor's
`Debugger` instance on navigations. This isn't really a "proper" leak, in that
if you forced a GC, the old debuggees would go away as `Debugger` holds them
weakly, however if there was no GC between navigations, then you could still see
the old windows (and everything they "retained") as roots in the snapshot. This
issue is straightforward to fix once identified: ensure that `_clearDebuggees`
is actually called on navigation.

Finally, this commit adds a test that we don't leak Window objects when devtools
are open and we keep refreshing a tab. When it fails, it prints out the leaking
window's retaining paths.
2016-07-06 08:37:57 -07:00
..
actors Bug 1261869 - Fix leaks in devtools; r=ejpbruel 2016-07-06 08:37:57 -07:00
docs Bug 1282900 - Remove RDP telemetry probes and surrounding machinery. r=fitzgen 2016-06-29 11:37:09 -05:00
performance Bug 1261869 - Fix leaks in devtools; r=ejpbruel 2016-07-06 08:37:57 -07:00
shims Bug 1271399 - Add shim for protocol.js to support old add-ons. r=ednapiranha 2016-05-10 12:10:00 +02:00
tests Bug 1265727 - Decouple FramerateFront from FramerateActor;r=fitzgen 2016-07-04 17:50:30 +02:00
child.js Bug 1283583 - Clean up code style in devtools/server/child.js. r=ochameau 2016-07-01 18:35:25 -05:00
content-globals.js Bug 1271084 - Apply ESLint autofixes to ignored /devtools files. r=tromey 2016-05-18 12:49:23 -05:00
content-server.jsm Bug 1261665 - Remove unecessary Loader.jsm main in favor of require(). r=jryans 2016-04-14 01:40:43 -07:00
css-logic.js Bug 1225254 - split css-logic.js into server and shared files; r=pbro 2016-06-24 08:26:21 -06:00
main.js Bug 1283583 - Clean up code style in devtools/server/main.js. r=ochameau 2016-07-01 18:35:25 -05:00
moz.build Bug 1225254 - split css-logic.js into server and shared files; r=pbro 2016-06-24 08:26:21 -06:00
nsIJSInspector.idl
nsJSInspector.cpp Bug 1247679, part 3 - Replace NS_IMPL_CYCLE_COLLECTION_TRACE_JSVAL_MEMBER_CALLBACK with JS_MEMBER. r=smaug 2016-02-22 10:11:02 -08:00
nsJSInspector.h
primitive.js Bug 1271084 - Apply ESLint autofixes to ignored /devtools files. r=tromey 2016-05-18 12:49:23 -05:00
service-worker-child.js Bug 1239705 - Add a 'Start' button for service workers in about:debugging. r=ochameau 2016-03-03 09:47:23 -06:00
worker.js Bug 1271084 - Apply ESLint autofixes to ignored /devtools files. r=tromey 2016-05-18 12:49:23 -05:00