Bug 1128027 - Inspector destroy error was holding document alive. r=bgrins a=lsblakk
💩💩 backed out by 21120474140d 💩 💩
authorJ. Ryan Stinnett <jryans@gmail.com>
Fri, 27 Feb 2015 17:50:50 -0600
changeset 250128 569e2110f0ff
parent 250127 4c02cca13dbe
child 250129 b82653e56ec9
push id4508
push userjryans@gmail.com
push date2015-02-27 23:52 +0000
treeherdermozilla-beta@012e92feffe6 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbgrins, lsblakk
bugs1128027
milestone37.0
Bug 1128027 - Inspector destroy error was holding document alive. r=bgrins a=lsblakk
toolkit/devtools/server/actors/inspector.js
--- a/toolkit/devtools/server/actors/inspector.js
+++ b/toolkit/devtools/server/actors/inspector.js
@@ -1183,29 +1183,33 @@ var WalkerActor = protocol.ActorClass({
     }
   },
 
   toString: function() {
     return "[WalkerActor " + this.actorID + "]";
   },
 
   destroy: function() {
-    this._destroyed = true;
-
-    this.clearPseudoClassLocks();
-    this._activePseudoClassLocks = null;
-
-    this._hoveredNode = null;
-    this.rootDoc = null;
-
-    this.reflowObserver.off("reflows", this._onReflows);
-    this.reflowObserver = null;
-    releaseLayoutChangesObserver(this.tabActor);
-
-    events.emit(this, "destroyed");
+    try {
+      this._destroyed = true;
+
+      this.clearPseudoClassLocks();
+      this._activePseudoClassLocks = null;
+
+      this._hoveredNode = null;
+      this.rootDoc = null;
+
+      this.reflowObserver.off("reflows", this._onReflows);
+      this.reflowObserver = null;
+      releaseLayoutChangesObserver(this.tabActor);
+
+      events.emit(this, "destroyed");
+    } catch(e) {
+      console.error(e);
+    }
     protocol.Actor.prototype.destroy.call(this);
   },
 
   release: method(function() {}, { release: true }),
 
   unmanage: function(actor) {
     if (actor instanceof NodeActor) {
       if (this._activePseudoClassLocks &&