| Index: src/objects.cc
|
| diff --git a/src/objects.cc b/src/objects.cc
|
| index 008058894833b5114da05b9cdd3f181ba7216ebe..640ef0d7979fafa613d6b311f80d571a4d1cf36f 100644
|
| --- a/src/objects.cc
|
| +++ b/src/objects.cc
|
| @@ -10565,7 +10565,8 @@ void SharedFunctionInfo::DisableOptimization(BailoutReason reason) {
|
| void SharedFunctionInfo::InitFromFunctionLiteral(
|
| Handle<SharedFunctionInfo> shared_info, FunctionLiteral* lit) {
|
| shared_info->set_length(lit->scope()->default_function_length());
|
| - if (IsSubclassConstructor(lit->kind())) {
|
| + if (IsSubclassConstructor(lit->kind()) ||
|
| + lit->scope()->new_target_var() != nullptr) {
|
| shared_info->set_internal_formal_parameter_count(lit->parameter_count() +
|
| 1);
|
| } else {
|
|
|