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

Unified Diff: src/bootstrapper.cc

Issue 2375793002: Reland: [modules] Properly initialize declared variables. (Closed)
Patch Set: Created 4 years, 3 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
« no previous file with comments | « src/ast/scopes.cc ('k') | src/contexts.h » ('j') | src/parsing/parser.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/bootstrapper.cc
diff --git a/src/bootstrapper.cc b/src/bootstrapper.cc
index 6f5dcff189a37235eb57ea0ec26a8d18c136c5c4..32df9810c4e279f57b7f2e703ca2875e2aaa16e6 100644
--- a/src/bootstrapper.cc
+++ b/src/bootstrapper.cc
@@ -696,8 +696,10 @@ void Genesis::CreateIteratorMaps(Handle<JSFunction> empty) {
factory()->to_string_tag_symbol(),
factory()->NewStringFromAsciiChecked("Generator"),
static_cast<PropertyAttributes>(DONT_ENUM | READ_ONLY));
- SimpleInstallFunction(generator_object_prototype, "next",
- Builtins::kGeneratorPrototypeNext, 1, true);
+ Handle<JSFunction> next =
+ SimpleInstallFunction(generator_object_prototype, "next",
+ Builtins::kGeneratorPrototypeNext, 1, true);
+ native_context()->set_generator_prototype_next(*next);
SimpleInstallFunction(generator_object_prototype, "return",
Builtins::kGeneratorPrototypeReturn, 1, true);
SimpleInstallFunction(generator_object_prototype, "throw",
« no previous file with comments | « src/ast/scopes.cc ('k') | src/contexts.h » ('j') | src/parsing/parser.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698