Chromium Code Reviews| Index: src/x64/code-stubs-x64.cc |
| diff --git a/src/x64/code-stubs-x64.cc b/src/x64/code-stubs-x64.cc |
| index fc080f4c4cc2fc63abbf122d7d4f4e23b903892d..4e95a1ffb56679ffdfd8d743020402fddf470f6a 100644 |
| --- a/src/x64/code-stubs-x64.cc |
| +++ b/src/x64/code-stubs-x64.cc |
| @@ -2836,15 +2836,20 @@ void CallApiCallbackStub::Generate(MacroAssembler* masm) { |
| // holder |
| __ Push(holder); |
| - __ movp(scratch, rsp); |
| - // Push return address back on stack. |
| - __ PushReturnAddressFrom(return_address); |
| - |
| - if (!this->is_lazy()) { |
| + if (this->is_lazy()) { |
| + // load context from holder |
| + __ movp(scratch, FieldOperand(holder, HeapObject::kMapOffset)); |
|
Yuki
2017/03/28 14:16:58
|holder| seems pointing to the receiver object ins
jochen (gone - plz use gerrit)
2017/03/28 14:43:39
is that only the case for your test? In that case,
Yuki
2017/03/29 14:19:41
I only tested with the new unittest. I installed
|
| + __ GetMapConstructor(scratch, scratch, context); |
| + __ movp(context, FieldOperand(scratch, JSFunction::kContextOffset)); |
| + } else { |
| // load context from callee |
| __ movp(context, FieldOperand(callee, JSFunction::kContextOffset)); |
| } |
| + __ movp(scratch, rsp); |
| + // Push return address back on stack. |
| + __ PushReturnAddressFrom(return_address); |
| + |
| // Allocate the v8::Arguments structure in the arguments' space since |
| // it's not controlled by GC. |
| const int kApiStackSpace = 3; |