Index: src/heap.cc |
diff --git a/src/heap.cc b/src/heap.cc |
index 7eb6881e9a2726265aebd8945eda5062412ac974..bcb826df3ab32f826dbf4b2f630e0c8d7d628b0a 100644 |
--- a/src/heap.cc |
+++ b/src/heap.cc |
@@ -4361,6 +4361,7 @@ MaybeObject* Heap::AllocateJSGeneratorObject(JSFunction *function) { |
MaybeObject* maybe_map = AllocateInitialMap(function); |
if (!maybe_map->To(&map)) return maybe_map; |
function->set_initial_map(map); |
+ map->set_constructor(function); |
} |
ASSERT(map->instance_type() == JS_GENERATOR_OBJECT_TYPE); |
return AllocateJSObjectFromMap(map); |