Bug 1434217 - remove deprecated frontForRawNode from inspector front;r=bgrins

MozReview-Commit-ID: GvK2lGDq8ea

--HG--
extra : rebase_source : 7e90754cf83406f08d82b50d79704912c39dca7d
This commit is contained in:
Julian Descottes 2018-01-30 14:30:14 +01:00
Родитель 7cb0ab74fe
Коммит 86302f330b
1 изменённых файлов: 0 добавлений и 33 удалений

Просмотреть файл

@ -437,39 +437,6 @@ const WalkerFront = FrontClassWithSpec(walkerSpec, {
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);