Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(17)

Unified Diff: third_party/WebKit/Source/platform/v8_inspector/InjectedScriptSource.js

Issue 2056433002: DevTools: properly format custom elements without nodenames (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/platform/v8_inspector/InjectedScriptSource.js
diff --git a/third_party/WebKit/Source/platform/v8_inspector/InjectedScriptSource.js b/third_party/WebKit/Source/platform/v8_inspector/InjectedScriptSource.js
index e15ab5e6d2c599086bae6c335f03a8d2b2f5162a..0e0c4f8d28065b05a5f348091ce7784c29cfe994 100644
--- a/third_party/WebKit/Source/platform/v8_inspector/InjectedScriptSource.js
+++ b/third_party/WebKit/Source/platform/v8_inspector/InjectedScriptSource.js
@@ -580,7 +580,12 @@ InjectedScript.prototype = {
return toString(obj);
if (subtype === "node") {
- var description = obj.nodeName.toLowerCase();
+ var description = "";
+ if (obj.nodeName)
+ description = obj.nodeName.toLowerCase();
+ else if (obj.constructor)
+ description = obj.constructor.name.toLowerCase();
+
switch (obj.nodeType) {
kozy 2016/06/08 20:58:05 What will return obj.nodeType in createCallback fo
luoe 2016/06/09 19:27:44 obj.nodeType will be undefined, in both cases when
case 1 /* Node.ELEMENT_NODE */:
description += obj.id ? "#" + obj.id : "";

Powered by Google App Engine
This is Rietveld 408576698