# HG changeset patch # User Julian Descottes # Date 1517319014 -3600 # Node ID 0791e341ffa3566d74a0ba21994c6b06c6159ebc # Parent de8ec78f2fbb5f177cdab5d855974c4c77f99c33 Bug 1434217 - remove deprecated frontForRawNode from inspector front;r=bgrins MozReview-Commit-ID: GvK2lGDq8ea diff --git a/devtools/shared/fronts/inspector.js b/devtools/shared/fronts/inspector.js --- a/devtools/shared/fronts/inspector.js +++ b/devtools/shared/fronts/inspector.js @@ -432,49 +432,16 @@ const WalkerFront = FrontClassWithSpec(w // Fetch and process the mutations. this.getMutations({cleanup: this.autoCleanup}).catch(() => {}); }), isLocal: function () { return !!this.conn._transport._serverConnection; }, - // XXX hack during transition to remote inspector: get a proper NodeFront - // for a given local node. Only works locally. - frontForRawNode: function (rawNode) { - if (!this.isLocal()) { - console.warn("Tried to use frontForRawNode on a remote connection."); - return null; - } - const { DebuggerServer } = require("devtools/server/main"); - let walkerActor = DebuggerServer.searchAllConnectionsForActor(this.actorID); - if (!walkerActor) { - throw Error("Could not find client side for actor " + this.actorID); - } - let nodeActor = walkerActor._ref(rawNode); - - // Pass the node through a read/write pair to create the client side actor. - let nodeType = types.getType("domnode"); - let returnNode = nodeType.read( - nodeType.write(nodeActor, walkerActor), this); - let top = returnNode; - let extras = walkerActor.parents(nodeActor, {sameTypeRootTreeItem: true}); - for (let extraActor of extras) { - top = nodeType.read(nodeType.write(extraActor, walkerActor), this); - } - - if (top !== this.rootNode) { - // Imported an already-orphaned node. - this._orphaned.add(top); - walkerActor._orphaned - .add(DebuggerServer.searchAllConnectionsForActor(top.actorID)); - } - return returnNode; - }, - removeNode: custom(Task.async(function* (node) { let previousSibling = yield this.previousSibling(node); let nextSibling = yield this._removeNode(node); return { previousSibling: previousSibling, nextSibling: nextSibling, }; }), {