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

Unified Diff: Source/core/inspector/InjectedScriptSource.js

Issue 295633003: Show information about Symbols in DevTools console. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Wrap Symbol.prototype.toString.call in a try-catch block Created 6 years, 7 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
« no previous file with comments | « no previous file | Source/devtools/protocol.json » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/inspector/InjectedScriptSource.js
diff --git a/Source/core/inspector/InjectedScriptSource.js b/Source/core/inspector/InjectedScriptSource.js
index d4d366d4fb37a7295c481aa3649d388adb629560..76be98c84b3a71e77c2cfce7865beb1ad99c02e4 100644
--- a/Source/core/inspector/InjectedScriptSource.js
+++ b/Source/core/inspector/InjectedScriptSource.js
@@ -1008,6 +1008,13 @@ InjectedScript.prototype = {
if (typeof obj === "function")
return toString(obj);
+ if (typeof obj === "symbol")
aandrey 2014/05/22 16:10:16 { ... }
Alexandra Mikhaylova 2014/05/26 10:38:34 Done.
+ try {
+ return Symbol.prototype.toString.call(obj);
aandrey 2014/05/22 16:10:16 || "Symbol";
Alexandra Mikhaylova 2014/05/26 10:38:34 Done.
+ } catch (e) {
+ return "Symbol";
+ }
+
if (className === "Object") {
// In Chromium DOM wrapper prototypes will have Object as their constructor name,
// get the real DOM wrapper name from the constructor property.
« no previous file with comments | « no previous file | Source/devtools/protocol.json » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698