Index: src/debug/ia32/debug-ia32.cc |
diff --git a/src/debug/ia32/debug-ia32.cc b/src/debug/ia32/debug-ia32.cc |
index d07ac5172185c22d4a49ef7b7e96b29dfb79eb35..e1d0a143a3cba5446c9206766e6ba94bcee8830e 100644 |
--- a/src/debug/ia32/debug-ia32.cc |
+++ b/src/debug/ia32/debug-ia32.cc |
@@ -125,13 +125,16 @@ |
// 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); |
} |