Ensure that collection iterators' maps have constructors

This fixes JSObject::GetCreationContext() for such iterators.

R=rossberg@chromium.org

Review URL: https://codereview.chromium.org/288233002

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@21333 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
parent 628bdf69
...@@ -1314,11 +1314,13 @@ void Genesis::InitializeExperimentalGlobal() { ...@@ -1314,11 +1314,13 @@ void Genesis::InitializeExperimentalGlobal() {
{ // -- S e t I t e r a t o r { // -- S e t I t e r a t o r
Handle<Map> map = isolate()->factory()->NewMap( Handle<Map> map = isolate()->factory()->NewMap(
JS_SET_ITERATOR_TYPE, JSSetIterator::kSize); JS_SET_ITERATOR_TYPE, JSSetIterator::kSize);
map->set_constructor(native_context()->closure());
native_context()->set_set_iterator_map(*map); native_context()->set_set_iterator_map(*map);
} }
{ // -- M a p I t e r a t o r { // -- M a p I t e r a t o r
Handle<Map> map = isolate()->factory()->NewMap( Handle<Map> map = isolate()->factory()->NewMap(
JS_MAP_ITERATOR_TYPE, JSMapIterator::kSize); JS_MAP_ITERATOR_TYPE, JSMapIterator::kSize);
map->set_constructor(native_context()->closure());
native_context()->set_map_iterator_map(*map); native_context()->set_map_iterator_map(*map);
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment