Index: src/objects.cc |
diff --git a/src/objects.cc b/src/objects.cc |
index c92b5f1fddd7f76a16107ef5212a57551e84b4c6..d91b49d4a10c410971d16eee955ce8e684ed3351 100644 |
--- a/src/objects.cc |
+++ b/src/objects.cc |
@@ -10387,7 +10387,7 @@ void SharedFunctionInfo::DisableOptimization(BailoutReason reason) { |
void SharedFunctionInfo::InitFromFunctionLiteral( |
Handle<SharedFunctionInfo> shared_info, FunctionLiteral* lit) { |
- shared_info->set_length(lit->parameter_count()); |
+ shared_info->set_length(lit->scope()->default_function_length()); |
if (IsSubclassConstructor(lit->kind())) { |
shared_info->set_internal_formal_parameter_count(lit->parameter_count() + |
1); |