Index: src/x87/code-stubs-x87.cc |
diff --git a/src/x87/code-stubs-x87.cc b/src/x87/code-stubs-x87.cc |
index b13eda0d89ddba76c368aee34c6bf87ff1d24047..ba571f11c6e814f5c63da1431a57a8655ca11ff6 100644 |
--- a/src/x87/code-stubs-x87.cc |
+++ b/src/x87/code-stubs-x87.cc |
@@ -5182,7 +5182,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 |
@@ -5256,8 +5256,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 |
@@ -5329,7 +5331,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); |
} |
@@ -5337,8 +5339,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); |
} |