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

Unified Diff: src/d8.js

Issue 12459026: ES6 symbols: implement name property (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Addressed comments Created 7 years, 9 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 | src/heap.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/d8.js
diff --git a/src/d8.js b/src/d8.js
index 1ff0ce8980dda2ed8843364eac299931a9a3dfec..df1046133fbff449b29d40aa482b691ecff936fa 100644
--- a/src/d8.js
+++ b/src/d8.js
@@ -2214,7 +2214,8 @@ function Stringify(x, depth) {
return x.toString();
case "string":
return "\"" + x.toString() + "\"";
- // TODO(rossberg): add symbol case
+ case "symbol":
+ return "Symbol(" + (x.name ? Stringify(x.name, depth) : "") + ")"
case "object":
if (x === null) return "null";
if (x.constructor && x.constructor.name === "Array") {
« no previous file with comments | « no previous file | src/heap.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698