Index: src/debug/x87/debug-x87.cc |
diff --git a/src/debug/x87/debug-x87.cc b/src/debug/x87/debug-x87.cc |
index 3d7b49c80a53a118fdcc3f408961e1a804be8791..2718dcb624243c0a1f174f092206f31efe151ae0 100644 |
--- a/src/debug/x87/debug-x87.cc |
+++ b/src/debug/x87/debug-x87.cc |
@@ -125,13 +125,16 @@ void DebugCodegen::GenerateFrameDropperLiveEdit(MacroAssembler* masm) { |
// Load context from the function. |
__ mov(esi, FieldOperand(edi, JSFunction::kContextOffset)); |
+ // Clear new.target register as a safety measure. |
+ __ mov(edx, masm->isolate()->factory()->undefined_value()); |
+ |
// Get function code. |
- __ mov(edx, FieldOperand(edi, JSFunction::kSharedFunctionInfoOffset)); |
- __ mov(edx, FieldOperand(edx, SharedFunctionInfo::kCodeOffset)); |
- __ lea(edx, FieldOperand(edx, Code::kHeaderSize)); |
+ __ mov(ebx, FieldOperand(edi, JSFunction::kSharedFunctionInfoOffset)); |
+ __ mov(ebx, FieldOperand(ebx, SharedFunctionInfo::kCodeOffset)); |
+ __ lea(ebx, FieldOperand(ebx, Code::kHeaderSize)); |
// Re-run JSFunction, edi is function, esi is context. |
- __ jmp(edx); |
+ __ jmp(ebx); |
} |