Index: src/x64/macro-assembler-x64.cc |
diff --git a/src/x64/macro-assembler-x64.cc b/src/x64/macro-assembler-x64.cc |
index e3c9a9240edc0789db7b6fc35d4eda7dc4a1089f..9e6c4c978e83246ad351ce4e5d3d1ffc9f018d5b 100644 |
--- a/src/x64/macro-assembler-x64.cc |
+++ b/src/x64/macro-assembler-x64.cc |
@@ -746,14 +746,14 @@ void MacroAssembler::CallApiFunctionAndReturn(Address function_address, |
LeaveApiExitFrame(); |
ret(stack_space * kPointerSize); |
- bind(&promote_scheduled_exception); |
- TailCallRuntime(Runtime::kPromoteScheduledException, 0, 1); |
- |
bind(&empty_result); |
// It was zero; the result is undefined. |
- Move(rax, factory->undefined_value()); |
+ LoadRoot(rax, Heap::kUndefinedValueRootIndex); |
jmp(&prologue); |
+ bind(&promote_scheduled_exception); |
+ TailCallRuntime(Runtime::kPromoteScheduledException, 0, 1); |
+ |
// HandleScope limit has changed. Delete allocated extensions. |
bind(&delete_allocated_handles); |
movq(Operand(base_reg, kLimitOffset), prev_limit_reg); |