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

Unified Diff: src/collection.js

Issue 461453002: Implement well-known symbol `Symbol.toStringTag` Base URL: git://github.com/v8/v8.git@master
Patch Set: Created 6 years, 4 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/symbol.js » ('j') | src/v8natives.js » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/collection.js
diff --git a/src/collection.js b/src/collection.js
index e5fc0b33c8813a8071b85871d59166eca6d76eee..f2a8546eee63cf14966b716a869ced8005ebc729 100644
--- a/src/collection.js
+++ b/src/collection.js
@@ -148,6 +148,7 @@ function SetUpSet() {
%SetCode($Set, SetConstructor);
%FunctionSetPrototype($Set, new $Object());
%AddNamedProperty($Set.prototype, "constructor", $Set, DONT_ENUM);
+ %AddNamedProperty($Set.prototype, symbolToStringTag, "Set", DONT_ENUM | READ_ONLY);
%FunctionSetLength(SetForEach, 1);
@@ -283,6 +284,7 @@ function SetUpMap() {
%SetCode($Map, MapConstructor);
%FunctionSetPrototype($Map, new $Object());
%AddNamedProperty($Map.prototype, "constructor", $Map, DONT_ENUM);
+ %AddNamedProperty($Map.prototype, symbolToStringTag, "Map", DONT_ENUM | READ_ONLY);
%FunctionSetLength(MapForEach, 1);
« no previous file with comments | « no previous file | src/symbol.js » ('j') | src/v8natives.js » ('J')

Powered by Google App Engine
This is Rietveld 408576698