| Index: src/compiler/js-generic-lowering.cc
|
| diff --git a/src/compiler/js-generic-lowering.cc b/src/compiler/js-generic-lowering.cc
|
| index d326e806078f83197c5734406a872fa5e360c3d3..cf9ef1717177b593119b5326bc214938cbc91a95 100644
|
| --- a/src/compiler/js-generic-lowering.cc
|
| +++ b/src/compiler/js-generic-lowering.cc
|
| @@ -397,7 +397,9 @@ bool JSGenericLowering::TryLowerDirectJSCall(Node* node) {
|
| Handle<Object> func = function_const.Value().handle();
|
| if (!func->IsJSFunction()) return false; // not a function.
|
| Handle<JSFunction> function = Handle<JSFunction>::cast(func);
|
| - if (arg_count != function->shared()->formal_parameter_count()) return false;
|
| + if (arg_count != function->shared()->internal_formal_parameter_count()) {
|
| + return false;
|
| + }
|
|
|
| // Check the receiver doesn't need to be wrapped.
|
| Node* receiver = node->InputAt(1);
|
|
|