Merge V8 5.3.332.45. DO NOT MERGE
Test: Manual
FPIIM-449
Change-Id: Id3254828b068abdea3cb10442e0172a8c9a98e03
(cherry picked from commit 13e2dadd00298019ed862f2b2fc5068bba730bcf)
diff --git a/src/js/collection.js b/src/js/collection.js
index 0d7195d..bbb7ed2 100644
--- a/src/js/collection.js
+++ b/src/js/collection.js
@@ -19,6 +19,7 @@
var MapIterator;
var NumberIsNaN;
var SetIterator;
+var speciesSymbol = utils.ImportNow("species_symbol");
var toStringTagSymbol = utils.ImportNow("to_string_tag_symbol");
utils.Import(function(from) {
@@ -255,6 +256,12 @@
}
}
+
+function SetSpecies() {
+ return this;
+}
+
+
// -------------------------------------------------------------------
%SetCode(GlobalSet, SetConstructor);
@@ -266,6 +273,8 @@
%FunctionSetLength(SetForEach, 1);
+utils.InstallGetter(GlobalSet, speciesSymbol, SetSpecies);
+
// Set up the non-enumerable functions on the Set prototype object.
utils.InstallGetter(GlobalSet.prototype, "size", SetGetSize);
utils.InstallFunctions(GlobalSet.prototype, DONT_ENUM, [
@@ -435,6 +444,11 @@
}
}
+
+function MapSpecies() {
+ return this;
+}
+
// -------------------------------------------------------------------
%SetCode(GlobalMap, MapConstructor);
@@ -446,6 +460,8 @@
%FunctionSetLength(MapForEach, 1);
+utils.InstallGetter(GlobalMap, speciesSymbol, MapSpecies);
+
// Set up the non-enumerable functions on the Map prototype object.
utils.InstallGetter(GlobalMap.prototype, "size", MapGetSize);
utils.InstallFunctions(GlobalMap.prototype, DONT_ENUM, [