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

Unified Diff: src/collection.js

Issue 546803003: Update ObjectToString to Harmony-draft algorithm (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Add @@toStringTag to some objects + tests Created 6 years, 2 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 | « src/arraybuffer.js ('k') | src/generator.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 0027bd732041f94ccf81dbfe3256c4f75d680c5a..ff747accff85ed33cb62ad40c42aa805c1abd4af 100644
--- a/src/collection.js
+++ b/src/collection.js
@@ -126,6 +126,8 @@ 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);
@@ -268,6 +270,8 @@ 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 | « src/arraybuffer.js ('k') | src/generator.js » ('j') | src/v8natives.js » ('J')

Powered by Google App Engine
This is Rietveld 408576698