Index: src/factory.cc |
diff --git a/src/factory.cc b/src/factory.cc |
index 5e2a2b18741507e4239bcfab8506712783a01c2c..01b885cafdb9d1b7ede7d9cf9d7289b707cee47c 100644 |
--- a/src/factory.cc |
+++ b/src/factory.cc |
@@ -1078,6 +1078,7 @@ void Factory::SetIdentityHash(Handle<JSObject> object, Smi* hash) { |
Handle<SharedFunctionInfo> Factory::NewSharedFunctionInfo( |
Handle<String> name, |
int number_of_literals, |
+ bool is_generator, |
Handle<Code> code, |
Handle<ScopeInfo> scope_info) { |
Handle<SharedFunctionInfo> shared = NewSharedFunctionInfo(name); |
@@ -1091,6 +1092,9 @@ Handle<SharedFunctionInfo> Factory::NewSharedFunctionInfo( |
literals_array_size += JSFunction::kLiteralsPrefixSize; |
} |
shared->set_num_literals(literals_array_size); |
+ if (is_generator) { |
+ shared->set_instance_class_name(isolate()->heap()->Generator_string()); |
+ } |
return shared; |
} |