Commit 784e2f5e authored by Alexey Kozyatinskiy's avatar Alexey Kozyatinskiy Committed by Commit Bot

[inspector] little better injected-script-source

We can call less getters on node objects.

R=dgozman@chromium.org

Bug: chromium:799791
Cq-Include-Trybots: master.tryserver.blink:linux_trusty_blink_rel
Change-Id: Iecfe76c2be6b6bed675013ac4aaa117b714d4ba5
Reviewed-on: https://chromium-review.googlesource.com/854623Reviewed-by: 's avatarDmitry Gozman <dgozman@chromium.org>
Commit-Queue: Aleksey Kozyatinskiy <kozyatinskiy@chromium.org>
Cr-Commit-Position: refs/heads/master@{#50420}
parent 40d6a6cf
......@@ -599,7 +599,8 @@ InjectedScript.prototype = {
description = (InjectedScriptHost.getProperty(constructor, "name") || "").toLowerCase();
}
switch (obj.nodeType) {
var nodeType = InjectedScriptHost.getProperty(obj, "nodeType");
switch (nodeType) {
case 1 /* Node.ELEMENT_NODE */:
var id = InjectedScriptHost.getProperty(obj, "id");
description += id ? "#" + id : "";
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment