Index: src/objects.cc |
diff --git a/src/objects.cc b/src/objects.cc |
index f44e10b206095e1455f58b07f5d9e8358b246cf1..d844946604b3479c83de94f5aaa21b1d6e6f8ef8 100644 |
--- a/src/objects.cc |
+++ b/src/objects.cc |
@@ -12631,6 +12631,10 @@ void SharedFunctionInfo::InitFromFunctionLiteral( |
shared_info->set_dont_crankshaft(lit->flags() & |
AstProperties::kDontCrankshaft); |
shared_info->set_kind(lit->kind()); |
+ if (!IsConstructable(lit->kind(), lit->language_mode())) { |
+ shared_info->set_construct_stub( |
+ *shared_info->GetIsolate()->builtins()->ConstructedNonConstructable()); |
+ } |
shared_info->set_needs_home_object(lit->scope()->NeedsHomeObject()); |
shared_info->set_asm_function(lit->scope()->asm_function()); |
} |