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

Unified Diff: src/bootstrapper.cc

Issue 1428823002: [es6] Fix Function and GeneratorFunction built-ins subclassing. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@subclass
Patch Set: Addressing comments Created 5 years, 2 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 | « no previous file | src/factory.h » ('j') | no next file with comments »
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 a8d0299095cb621cba2dbd3f2aff37ce51e76071..b023fea8502456bcb42ab5dab282c8b75425a511 100644
--- a/src/bootstrapper.cc
+++ b/src/bootstrapper.cc
@@ -1116,6 +1116,7 @@ void Genesis::InitializeGlobal(Handle<GlobalObject> global_object,
InstallFunction(global, "Function", JS_FUNCTION_TYPE, JSFunction::kSize,
empty_function, Builtins::kIllegal);
function_function->initial_map()->set_is_callable();
+ function_function->initial_map()->set_is_constructor(true);
{ // --- A r r a y ---
Handle<JSFunction> array_function =
@@ -1951,6 +1952,7 @@ void Bootstrapper::ExportFromRuntime(Isolate* isolate,
JSFunction::kSize, generator_function_prototype,
Builtins::kIllegal, kUseStrictFunctionMap);
generator_function_function->initial_map()->set_is_callable();
+ generator_function_function->initial_map()->set_is_constructor(true);
}
{ // -- S e t I t e r a t o r
« no previous file with comments | « no previous file | src/factory.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698