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

Unified Diff: src/bootstrapper.cc

Issue 2118653004: [builtins] make AsyncFunction constructor a subclass of Function (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Don't redundantly call set_prototype_or_initial_map() Created 4 years, 6 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 | test/mjsunit/harmony/async-await-basic.js » ('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 795682ff4442969ae351c6ed821422a6cac75c52..26bdb6125d879bd3fcc536d2136cb26e534340d4 100644
--- a/src/bootstrapper.cc
+++ b/src/bootstrapper.cc
@@ -2637,14 +2637,14 @@ void Bootstrapper::ExportFromRuntime(Isolate* isolate,
container, "AsyncFunction", JS_FUNCTION_TYPE, JSFunction::kSize,
async_function_prototype, Builtins::kAsyncFunctionConstructor,
kUseStrictFunctionMap);
- async_function_constructor->set_prototype_or_initial_map(
- native_context->sloppy_async_function_map());
async_function_constructor->shared()->DontAdaptArguments();
async_function_constructor->shared()->set_construct_stub(
*isolate->builtins()->AsyncFunctionConstructor());
async_function_constructor->shared()->set_length(1);
InstallWithIntrinsicDefaultProto(isolate, async_function_constructor,
Context::ASYNC_FUNCTION_FUNCTION_INDEX);
+ SetObjectPrototype(async_function_constructor,
+ isolate->function_function());
JSObject::AddProperty(
async_function_prototype, factory->constructor_string(),
« no previous file with comments | « no previous file | test/mjsunit/harmony/async-await-basic.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698