Index: src/compiler.cc |
diff --git a/src/compiler.cc b/src/compiler.cc |
index f04b231a1bc87eec6f4cc8db581dd17df4157191..dd5d4374c596bbbba9bf1b3dbad4ee4136d556fa 100644 |
--- a/src/compiler.cc |
+++ b/src/compiler.cc |
@@ -1425,6 +1425,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); |