From 1dda6ac253b4b96f4d39eac823c5353ee0171529 Mon Sep 17 00:00:00 2001 From: "zhengxing.li" Date: Sun, 6 Dec 2015 20:07:28 -0800 Subject: [PATCH] X87: Reland of [debugger] do not restart frames that reference new.target for liveedit. (patchset #1 id:1 of https://codereview.chromium.org/1493863004/ ) port 15cb3fde7db351138a8ac2c04be8e5d6b122ce97 (r32587) original commit message: Reason for revert: Didn't help... Original issue's description: > Revert of [debugger] do not restart frames that reference new.target for liveedit. (patchset #1 id:1 of https://codereview.chromium.org/1493363002/ ) > > Reason for revert: > [Sheriff] Speculative revert for https://build.chromium.org/p/client.v8.fyi/builders/V8-Blink%20Linux%2064/builds/3225 > > Original issue's description: > > [debugger] do not restart frames that reference new.target for liveedit. > > > > R=mstarzinger@chromium.org > > > > Committed: https://crrev.com/6fca870240bdbb07a365189b5eb0c98fa65b3682 > > Cr-Commit-Position: refs/heads/master@{#32572} > > TBR=mstarzinger@chromium.org,yangguo@chromium.org > NOPRESUBMIT=true > NOTREECHECKS=true > NOTRY=true > > Committed: https://crrev.com/1a61dab34b9849f3f70a42ce69317e22758c53a1 > Cr-Commit-Position: refs/heads/master@{#32582} BUG= Review URL: https://codereview.chromium.org/1501323002 Cr-Commit-Position: refs/heads/master@{#32637} --- src/debug/x87/debug-x87.cc | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/src/debug/x87/debug-x87.cc b/src/debug/x87/debug-x87.cc index 3d7b49c80a..2718dcb624 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); }