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

Unified Diff: src/runtime/runtime-function.cc

Issue 1510753005: Fix Function subclassing. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Adressing comments Created 5 years 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/objects-printer.cc ('k') | src/transitions-inl.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/runtime/runtime-function.cc
diff --git a/src/runtime/runtime-function.cc b/src/runtime/runtime-function.cc
index b294835916124dd11dd2c6dba11cf32e0b4aa8aa..499d4a9783f9dd7cc716610390d4636159b50cc3 100644
--- a/src/runtime/runtime-function.cc
+++ b/src/runtime/runtime-function.cc
@@ -77,10 +77,13 @@ RUNTIME_FUNCTION(Runtime_CompleteFunctionConstruction) {
JSFunction::GetDerivedMap(isolate, constructor, new_target));
Handle<SharedFunctionInfo> shared_info(func->shared(), isolate);
+ Handle<Map> map = Map::AsLanguageMode(
+ initial_map, shared_info->language_mode(), shared_info->kind());
+
Handle<Context> context(func->context(), isolate);
Handle<JSFunction> result =
isolate->factory()->NewFunctionFromSharedFunctionInfo(
- initial_map, shared_info, context, NOT_TENURED);
+ map, shared_info, context, NOT_TENURED);
DCHECK_EQ(func->IsConstructor(), result->IsConstructor());
return *result;
}
« no previous file with comments | « src/objects-printer.cc ('k') | src/transitions-inl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698