Index: test/mjsunit/builtins.js |
diff --git a/test/mjsunit/builtins.js b/test/mjsunit/builtins.js |
index fe7d35d8ea160fc447fe187980488f27a1581bbf..8cf21a4d1ef264eb4c15506b7f2787e334d77fff 100644 |
--- a/test/mjsunit/builtins.js |
+++ b/test/mjsunit/builtins.js |
@@ -39,12 +39,25 @@ function isFunction(obj) { |
} |
function isV8Native(name) { |
- return name == "GeneratorFunctionPrototype" || |
+ return name == "GeneratorFunction" || |
+ name == "GeneratorFunctionPrototype" || |
name == "SetIterator" || |
name == "MapIterator" || |
name == "ArrayIterator" || |
name == "StringIterator"; |
} |
+var V8NativePrototypes = { |
+ GeneratorFunction: Function.prototype, |
+ // TODO: Update the following values to the %IteratorPrototype% intrinsic |
caitp (gmail)
2015/04/06 18:05:05
TODO(name): ...
|
+ // once it is implemented. |
+ // Issue 3568: Generator Prototype should have an object between itself |
caitp (gmail)
2015/04/06 18:07:03
bug numbers might be iffy, especially if v8 has to
arv (Not doing code reviews)
2015/04/06 18:15:14
Bug numbers are fine. We have them all over. It mi
|
+ // and Object.prototype |
+ GeneratorFunctionPrototype: Object.prototype, |
+ SetIterator: Object.prototype, |
+ MapIterator: Object.prototype, |
+ ArrayIterator: Object.prototype, |
+ StringIterator: Object.prototype |
+}; |
function checkConstructor(func, name) { |
// A constructor is a function with a prototype and properties on the |
@@ -62,7 +75,7 @@ function checkConstructor(func, name) { |
assertFalse(proto_desc.writable, name); |
assertFalse(proto_desc.configurable, name); |
var prototype = proto_desc.value; |
- assertEquals(isV8Native(name) ? Object.prototype : null, |
+ assertEquals(V8NativePrototypes[name] || null, |
Object.getPrototypeOf(prototype), |
name); |
for (var i = 0; i < propNames.length; i++) { |