Bug 1368650 - Prevent NodeActor.destroy from throwing when called more than once. r=bgrins
MozReview-Commit-ID: DxTzq0FY8vb
--- a/devtools/server/actors/inspector.js
+++ b/devtools/server/actors/inspector.js
@@ -228,16 +228,19 @@ var NodeActor = exports.NodeActor = prot
isDocumentElement: function () {
return this.rawNode.ownerDocument &&
this.rawNode.ownerDocument.documentElement === this.rawNode;
},
destroy: function () {
protocol.Actor.prototype.destroy.call(this);
+ if (!this.walker) {
+ return;
+ }
if (this.mutationObserver) {
if (!Cu.isDeadWrapper(this.mutationObserver)) {
this.mutationObserver.disconnect();
}
this.mutationObserver = null;
}
this.rawNode = null;