Index: src/mips/code-stubs-mips.cc |
diff --git a/src/mips/code-stubs-mips.cc b/src/mips/code-stubs-mips.cc |
index 0fcdafca21d8321b86f5dd248382c71c63b31fa4..232e3605697758108c6f089edd616b19efc52ca1 100644 |
--- a/src/mips/code-stubs-mips.cc |
+++ b/src/mips/code-stubs-mips.cc |
@@ -2795,11 +2795,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 |
@@ -2911,6 +2906,9 @@ static void CallApiFunctionAndReturn( |
__ lw(t1, MemOperand(at)); |
__ Branch(&promote_scheduled_exception, ne, t0, Operand(t1)); |
+ // Check if the function returned a valid JavaScript value. |
+ __ AssertApiCallResult(v0); |
+ |
__ Ret(); |
// Re-throw by promoting a scheduled exception. |
@@ -2980,6 +2978,12 @@ void CallApiCallbackStub::Generate(MacroAssembler* masm) { |
// Push isolate and holder. |
__ Push(scratch, holder); |
+ if (!is_store()) { |
+ __ li(a0, Operand(argc())); |
+ __ Jump(masm->isolate()->builtins()->CallFunctionCallback(), |
+ RelocInfo::CODE_TARGET); |
+ } |
+ |
// Prepare arguments. |
__ mov(scratch, sp); |