Index: src/compiler.cc |
diff --git a/src/compiler.cc b/src/compiler.cc |
index 2fa5ff0541b7c096b108abf97e331d117e06c29c..1013a8ae0620dfdd1230f3e446f16b658268892d 100644 |
--- a/src/compiler.cc |
+++ b/src/compiler.cc |
@@ -1440,6 +1440,11 @@ Handle<SharedFunctionInfo> Compiler::GetSharedFunctionInfo( |
// first time. It may have already been compiled previously. |
result->set_never_compiled(outer_info->is_first_compile() && lazy); |
+ if (literal->scope()->new_target_var() != nullptr) { |
+ Handle<Code> stub(isolate->builtins()->JSConstructStubNewTarget()); |
+ result->set_construct_stub(*stub); |
+ } |
+ |
RecordFunctionCompilation(Logger::FUNCTION_TAG, &info, result); |
result->set_allows_lazy_compilation(literal->AllowsLazyCompilation()); |
result->set_allows_lazy_compilation_without_context(allow_lazy_without_ctx); |