Chromium Code Reviews| 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 : ""; |