Bug 1128027 - Inspector destroy error was holding document alive. r=bgrins a=lsblakk
authorJ. Ryan Stinnett <jryans@gmail.com>
Wed, 11 Mar 2015 12:07:22 -0500
changeset 250338 fa9b1bfa9f0e
parent 250337 f21e8fa80469
child 250339 fbef1b8d36e0
push id4553
push userjryans@gmail.com
push date2015-03-11 17:07 +0000
treeherdermozilla-beta@7e2e728297e6 [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 &&