Index: src/arm/stub-cache-arm.cc |
diff --git a/src/arm/stub-cache-arm.cc b/src/arm/stub-cache-arm.cc |
index aebec2aeea3b34cf777c03dc6d92531454cbf4ea..737e4490708a5d02517680c14b169b5667dab50f 100644 |
--- a/src/arm/stub-cache-arm.cc |
+++ b/src/arm/stub-cache-arm.cc |
@@ -965,8 +965,22 @@ static void GenerateFastApiDirectCall(MacroAssembler* masm, |
ExternalReference ref = ExternalReference(&fun, |
type, |
masm->isolate()); |
+ Address thunk_address = returns_handle |
+ ? FUNCTION_ADDR(&InvokeInvocationCallback) |
+ : FUNCTION_ADDR(&InvokeFunctionCallback); |
+ ExternalReference::Type thunk_type = |
+ returns_handle ? |
+ ExternalReference::PROFILING_API_CALL : |
+ ExternalReference::PROFILING_API_CALL_NEW; |
+ ApiFunction thunk_fun(thunk_address); |
+ ExternalReference thunk_ref = ExternalReference(&thunk_fun, thunk_type, |
+ masm->isolate()); |
+ |
AllowExternalCallThatCantCauseGC scope(masm); |
__ CallApiFunctionAndReturn(ref, |
+ function_address, |
+ thunk_ref, |
+ r1, |
kStackUnwindSpace, |
returns_handle, |
kFastApiCallArguments + 1); |
@@ -1463,14 +1477,28 @@ void BaseLoadStubCompiler::GenerateLoadCallback( |
Address getter_address = v8::ToCData<Address>(callback->getter()); |
bool returns_handle = |
!CallbackTable::ReturnsVoid(isolate(), getter_address); |
+ |
ApiFunction fun(getter_address); |
ExternalReference::Type type = |
returns_handle ? |
ExternalReference::DIRECT_GETTER_CALL : |
ExternalReference::DIRECT_GETTER_CALL_NEW; |
- |
ExternalReference ref = ExternalReference(&fun, type, isolate()); |
+ |
+ Address thunk_address = returns_handle |
+ ? FUNCTION_ADDR(&InvokeAccessorGetter) |
+ : FUNCTION_ADDR(&InvokeAccessorGetterCallback); |
+ ExternalReference::Type thunk_type = |
+ returns_handle ? |
+ ExternalReference::PROFILING_GETTER_CALL : |
+ ExternalReference::PROFILING_GETTER_CALL_NEW; |
+ ApiFunction thunk_fun(thunk_address); |
+ ExternalReference thunk_ref = ExternalReference(&thunk_fun, thunk_type, |
+ isolate()); |
__ CallApiFunctionAndReturn(ref, |
+ getter_address, |
+ thunk_ref, |
+ r2, |
kStackUnwindSpace, |
returns_handle, |
5); |