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

Unified Diff: src/bootstrapper.cc

Issue 1415683007: Reland "[es6] Fix Function and GeneratorFunction built-ins subclassing." (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@fix-subclass
Patch Set: Improved test Created 5 years, 1 month 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 d0eec88295a89a4f543e64a5111339d2fe10a979..ed887e7db3ef79e788abedfd3ef6e4d819852801 100644
--- a/src/bootstrapper.cc
+++ b/src/bootstrapper.cc
@@ -1101,6 +1101,7 @@ void Genesis::InitializeGlobal(Handle<JSGlobalObject> 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 =
@@ -1913,6 +1914,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