Bug 1145049 - Stop leaking tab actors and root actor on disconnect. r=jryans
☠☠ backed out by 77a8ea1b27c8 ☠ ☠
authorAlexandre Poirot <poirot.alex@gmail.com>
Wed, 15 Apr 2015 00:35:33 +0200
changeset 239320 4cf74e040c0adf7a2dcd5bf120aa17cbad6c5140
parent 239319 d800c6c9493d6ce02aca4c743acf19f1202db011
child 239321 75cc30c9a4017b48609d075408c87574f38cc0c7
push id28589
push userryanvm@gmail.com
push dateWed, 15 Apr 2015 19:13:10 +0000
treeherdermozilla-central@24ccca4707eb [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjryans
bugs1145049
milestone40.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1145049 - Stop leaking tab actors and root actor on disconnect. r=jryans
toolkit/devtools/server/actors/root.js
toolkit/devtools/server/main.js
--- a/toolkit/devtools/server/actors/root.js
+++ b/toolkit/devtools/server/actors/root.js
@@ -188,16 +188,21 @@ RootActor.prototype = {
     }
     if (this._parameters.addonList) {
       this._parameters.addonList.onListChanged = null;
     }
     if (typeof this._parameters.onShutdown === 'function') {
       this._parameters.onShutdown();
     }
     this._extraActors = null;
+    this.conn = null;
+    this._tabActorPool = null;
+    this._globalActorPool = null;
+    this._parameters = null;
+    this._chromeActor = null;
   },
 
   /* The 'listTabs' request and the 'tabListChanged' notification. */
 
   /**
    * Handles the listTabs request. The actors will survive until at least
    * the next listTabs request.
    */
--- a/toolkit/devtools/server/main.js
+++ b/toolkit/devtools/server/main.js
@@ -1550,16 +1550,18 @@ DebuggerServerConnection.prototype = {
       return;
     }
     events.emit(this, "closed", aStatus);
 
     this._actorPool = null;
     this._extraPools.map(function(p) { p.cleanup(); });
     this._extraPools = null;
 
+    this.rootActor = null;
+    this._transport = null;
     DebuggerServer._connectionClosed(this);
   },
 
   /*
    * Debugging helper for inspecting the state of the actor pools.
    */
   _dumpPools: function DSC_dumpPools() {
     dumpn("/-------------------- dumping pools:");