Index: src/arm/code-stubs-arm.cc |
diff --git a/src/arm/code-stubs-arm.cc b/src/arm/code-stubs-arm.cc |
index fc59f4007e1589f75e219534a55db84a1eb6f8af..6b0298941068bf4a982f6d65f8055e2b98b1860c 100644 |
--- a/src/arm/code-stubs-arm.cc |
+++ b/src/arm/code-stubs-arm.cc |
@@ -2613,11 +2613,6 @@ void InternalArrayConstructorStub::Generate(MacroAssembler* masm) { |
GenerateCase(masm, FAST_ELEMENTS); |
} |
-static int AddressOffset(ExternalReference ref0, ExternalReference ref1) { |
- return ref0.address() - ref1.address(); |
-} |
- |
- |
// Calls an API function. Allocates HandleScope, extracts returned value |
// from handle and propagates exceptions. Restores context. stack_space |
// - space to be unwound on exit (includes the call JS arguments space and |
@@ -2732,6 +2727,9 @@ static void CallApiFunctionAndReturn(MacroAssembler* masm, |
__ cmp(r4, r5); |
__ b(ne, &promote_scheduled_exception); |
+ // Check if the function returned a valid JavaScript value. |
+ __ AssertApiCallResult(r0); |
+ |
__ mov(pc, lr); |
// Re-throw by promoting a scheduled exception. |
@@ -2810,6 +2808,12 @@ void CallApiCallbackStub::Generate(MacroAssembler* masm) { |
// holder |
__ push(holder); |
+ if (!is_store()) { |
+ __ mov(r0, Operand(argc())); |
+ __ Jump(masm->isolate()->builtins()->CallFunctionCallback(), |
+ RelocInfo::CODE_TARGET); |
+ } |
+ |
// Prepare arguments. |
__ mov(scratch, sp); |