Index: src/js/collection-iterator.js |
diff --git a/src/js/collection-iterator.js b/src/js/collection-iterator.js |
index 133219d4a5e87ae8a470525d27a1cfcc7b602e79..ea84b0902b90094bcfd1f0d1764ff5e76a9a207e 100644 |
--- a/src/js/collection-iterator.js |
+++ b/src/js/collection-iterator.js |
@@ -10,8 +10,11 @@ |
var GlobalMap = global.Map; |
var GlobalSet = global.Set; |
+var IteratorPrototype = utils.ImportNow("IteratorPrototype"); |
var iteratorSymbol = utils.ImportNow("iterator_symbol"); |
+var MapIterator = utils.ImportNow("MapIterator"); |
var toStringTagSymbol = utils.ImportNow("to_string_tag_symbol"); |
+var SetIterator = utils.ImportNow("SetIterator"); |
// ------------------------------------------------------------------- |
@@ -65,7 +68,7 @@ function SetValues() { |
// ------------------------------------------------------------------- |
%SetCode(SetIterator, SetIteratorConstructor); |
-%FunctionSetPrototype(SetIterator, {__proto__: $iteratorPrototype}); |
+%FunctionSetPrototype(SetIterator, {__proto__: IteratorPrototype}); |
Camillo Bruni
2015/10/16 08:34:01
Not sure if that would add value: since you create
|
%FunctionSetInstanceClassName(SetIterator, 'Set Iterator'); |
utils.InstallFunctions(SetIterator.prototype, DONT_ENUM, [ |
'next', SetIteratorNextJS |
@@ -144,7 +147,7 @@ function MapValues() { |
// ------------------------------------------------------------------- |
%SetCode(MapIterator, MapIteratorConstructor); |
-%FunctionSetPrototype(MapIterator, {__proto__: $iteratorPrototype}); |
+%FunctionSetPrototype(MapIterator, {__proto__: IteratorPrototype}); |
Camillo Bruni
2015/10/16 08:34:00
ditto.
|
%FunctionSetInstanceClassName(MapIterator, 'Map Iterator'); |
utils.InstallFunctions(MapIterator.prototype, DONT_ENUM, [ |
'next', MapIteratorNextJS |