| Index: src/ia32/code-stubs-ia32.cc
|
| diff --git a/src/ia32/code-stubs-ia32.cc b/src/ia32/code-stubs-ia32.cc
|
| index fe65f1576929b2beec7ca6c9921e6db1ebbe6ade..6e969e10ef6099e223e375181ff3acdd7442e92d 100644
|
| --- a/src/ia32/code-stubs-ia32.cc
|
| +++ b/src/ia32/code-stubs-ia32.cc
|
| @@ -5502,7 +5502,7 @@ static void CallApiFunctionAndReturn(MacroAssembler* masm,
|
| static void CallApiFunctionStubHelper(MacroAssembler* masm,
|
| const ParameterCount& argc,
|
| bool return_first_arg,
|
| - bool call_data_undefined) {
|
| + bool call_data_undefined, bool is_lazy) {
|
| // ----------- S t a t e -------------
|
| // -- edi : callee
|
| // -- ebx : call_data
|
| @@ -5576,8 +5576,10 @@ static void CallApiFunctionStubHelper(MacroAssembler* masm,
|
| // push return address
|
| __ push(return_address);
|
|
|
| - // load context from callee
|
| - __ mov(context, FieldOperand(callee, JSFunction::kContextOffset));
|
| + if (!is_lazy) {
|
| + // load context from callee
|
| + __ mov(context, FieldOperand(callee, JSFunction::kContextOffset));
|
| + }
|
|
|
| // API function gets reference to the v8::Arguments. If CPU profiler
|
| // is enabled wrapper function will be called and we need to pass
|
| @@ -5649,7 +5651,7 @@ static void CallApiFunctionStubHelper(MacroAssembler* masm,
|
| void CallApiFunctionStub::Generate(MacroAssembler* masm) {
|
| bool call_data_undefined = this->call_data_undefined();
|
| CallApiFunctionStubHelper(masm, ParameterCount(eax), false,
|
| - call_data_undefined);
|
| + call_data_undefined, false);
|
| }
|
|
|
|
|
| @@ -5657,8 +5659,9 @@ void CallApiAccessorStub::Generate(MacroAssembler* masm) {
|
| bool is_store = this->is_store();
|
| int argc = this->argc();
|
| bool call_data_undefined = this->call_data_undefined();
|
| + bool is_lazy = this->is_lazy();
|
| CallApiFunctionStubHelper(masm, ParameterCount(argc), is_store,
|
| - call_data_undefined);
|
| + call_data_undefined, is_lazy);
|
| }
|
|
|
|
|
|
|