@@ -1447,12 +1447,14 @@ Node* JSNativeContextSpecialization::InlinePropertyGetterCall(
14471447 ConvertReceiverMode::kNotNullOrUndefined ),
14481448 target, receiver, context, frame_state0, *effect, *control);
14491449 } else {
1450+ Node* holder = jsgraph ()->Constant (access_info.holder ().ToHandleChecked ());
14501451 DCHECK (access_info.constant ()->IsFunctionTemplateInfo ());
14511452 Handle<FunctionTemplateInfo> function_template_info (
14521453 Handle<FunctionTemplateInfo>::cast (access_info.constant ()));
14531454 DCHECK (!function_template_info->call_code ()->IsUndefined (isolate ()));
1454- value = InlineApiCall (receiver, context, target, frame_state0, nullptr ,
1455- effect, control, shared_info, function_template_info);
1455+ value =
1456+ InlineApiCall (receiver, holder, context, target, frame_state0, nullptr ,
1457+ effect, control, shared_info, function_template_info);
14561458 }
14571459 // Remember to rewire the IfException edge if this is inside a try-block.
14581460 if (if_exceptions != nullptr ) {
@@ -1494,12 +1496,14 @@ Node* JSNativeContextSpecialization::InlinePropertySetterCall(
14941496 ConvertReceiverMode::kNotNullOrUndefined ),
14951497 target, receiver, value, context, frame_state0, *effect, *control);
14961498 } else {
1499+ Node* holder = jsgraph ()->Constant (access_info.holder ().ToHandleChecked ());
14971500 DCHECK (access_info.constant ()->IsFunctionTemplateInfo ());
14981501 Handle<FunctionTemplateInfo> function_template_info (
14991502 Handle<FunctionTemplateInfo>::cast (access_info.constant ()));
15001503 DCHECK (!function_template_info->call_code ()->IsUndefined (isolate ()));
1501- value = InlineApiCall (receiver, context, target, frame_state0, value,
1502- effect, control, shared_info, function_template_info);
1504+ value =
1505+ InlineApiCall (receiver, holder, context, target, frame_state0, value,
1506+ effect, control, shared_info, function_template_info);
15031507 }
15041508 // Remember to rewire the IfException edge if this is inside a try-block.
15051509 if (if_exceptions != nullptr ) {
@@ -1514,8 +1518,9 @@ Node* JSNativeContextSpecialization::InlinePropertySetterCall(
15141518}
15151519
15161520Node* JSNativeContextSpecialization::InlineApiCall (
1517- Node* receiver, Node* context, Node* target, Node* frame_state, Node* value,
1518- Node** effect, Node** control, Handle<SharedFunctionInfo> shared_info,
1521+ Node* receiver, Node* holder, Node* context, Node* target,
1522+ Node* frame_state, Node* value, Node** effect, Node** control,
1523+ Handle<SharedFunctionInfo> shared_info,
15191524 Handle<FunctionTemplateInfo> function_template_info) {
15201525 Handle<CallHandlerInfo> call_handler_info = handle (
15211526 CallHandlerInfo::cast (function_template_info->call_code ()), isolate ());
@@ -1532,7 +1537,7 @@ Node* JSNativeContextSpecialization::InlineApiCall(
15321537 CallDescriptor* call_descriptor = Linkage::GetStubCallDescriptor (
15331538 isolate (), graph ()->zone (), call_interface_descriptor,
15341539 call_interface_descriptor.GetStackParameterCount () + argc +
1535- 1 /* implicit receiver */ ,
1540+ 1 /* implicit receiver */ + 1 /* accessor holder */ ,
15361541 CallDescriptor::kNeedsFrameState , Operator::kNoProperties ,
15371542 MachineType::AnyTagged (), 1 );
15381543
@@ -1544,17 +1549,18 @@ Node* JSNativeContextSpecialization::InlineApiCall(
15441549 Node* code = jsgraph ()->HeapConstant (stub.GetCode ());
15451550
15461551 // Add CallApiCallbackStub's register argument as well.
1547- Node* inputs[11 ] = {
1548- code, target, data, receiver /* holder */ , function_reference, receiver};
1549- int index = 6 + argc;
1552+ Node* inputs[12 ] = {
1553+ code, target, data, receiver /* holder */ , function_reference,
1554+ holder, receiver};
1555+ int index = 7 + argc;
15501556 inputs[index++] = context;
15511557 inputs[index++] = frame_state;
15521558 inputs[index++] = *effect;
15531559 inputs[index++] = *control;
15541560 // This needs to stay here because of the edge case described in
15551561 // http://crbug.com/675648.
15561562 if (value != nullptr ) {
1557- inputs[6 ] = value;
1563+ inputs[7 ] = value;
15581564 }
15591565
15601566 return *effect = *control =
0 commit comments