Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(380)

Unified Diff: src/heap.cc

Issue 14262004: Generator objects have [[Class]] === "Generator" (Closed) Base URL: git://github.com/v8/v8.git@master
Patch Set: Address review comments Created 7 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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);
« no previous file with comments | « src/heap.h ('k') | src/macros.py » ('j') | test/mjsunit/harmony/generators-objects.js » ('J')

Powered by Google App Engine
This is Rietveld 408576698