Bug 951658 - Kill the inspector front even if walker.release() failed. r=pbrosset
authorPaul Rouget <paul@mozilla.com>
Wed, 18 Dec 2013 12:41:28 -0500
changeset 161098 0005da5d1ba169e915340ce6ffd6c123186e9dcc
parent 161097 c7493af8325d53cbe696e610bf1cfd61bdf7f0fa
child 161099 06dd25b41fe224fa9f5743cd747378a9d5d779bd
push id25867
push userryanvm@gmail.com
push dateThu, 19 Dec 2013 02:19:33 +0000
treeherdermozilla-central@04a70c8908de [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerspbrosset
bugs951658
milestone29.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 951658 - Kill the inspector front even if walker.release() failed. r=pbrosset
browser/devtools/inspector/inspector-panel.js
toolkit/devtools/server/protocol.js
--- a/browser/devtools/inspector/inspector-panel.js
+++ b/browser/devtools/inspector/inspector-panel.js
@@ -510,17 +510,21 @@ InspectorPanel.prototype = {
       this.highlighter.destroy();
     }
 
     delete this.onLockStateChanged;
 
     if (this.walker) {
       this.walker.off("new-root", this.onNewRoot);
       this._destroyPromise = this.walker.release()
-        .then(() => this._inspector.destroy())
+        .then(() => this._inspector.destroy(),
+              (e) => {
+                console.error("Walker.release() failed: " + e);
+                return this._inspector.destroy();
+              })
         .then(() => {
           this._inspector = null;
         }, console.error);
 
       delete this.walker;
       delete this.pageStyle;
     } else {
       this._destroyPromise = promise.resolve(null);
--- a/toolkit/devtools/server/protocol.js
+++ b/toolkit/devtools/server/protocol.js
@@ -1053,17 +1053,17 @@ let Front = Class({
         event.pre.forEach((pre) => pre.apply(this, args));
       }
       events.emit.apply(null, [this, event.name].concat(args));
       return;
     }
 
     // Remaining packets must be responses.
     if (this._requests.length === 0) {
-      let msg = "Unexpected packet from " + this.actorID + ", " + packet.type;
+      let msg = "Unexpected packet " + this.actorID + ", " + JSON.stringify(packet);
       let err = Error(msg);
       console.error(err);
       throw err;
     }
 
     let deferred = this._requests.shift();
     if (packet.error) {
       deferred.reject(packet.error);