Index: src/objects.cc |
diff --git a/src/objects.cc b/src/objects.cc |
index 31a7eb6e17501d5c4678cd0f70d50d70c4a9bd67..42a1c7e317863d57cf3f406e3ad099ec44793053 100644 |
--- a/src/objects.cc |
+++ b/src/objects.cc |
@@ -12732,6 +12732,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()); |
} |