I'm not entirely familiar with how frame restart works, so let me try to
understand:

When we restart frames, we find the ones we want to restart, clear the
corresponding range on the stack, and replace it with the frame dropper builtin,
which calls the function to the bottom frame again for restart.

The problem we want to solve is that when an exception is thrown, the debugger becomes active through OnException. Live edit may restart frames in that time. When we return to throwing exception after the OnException call, the exception is set as pending exception, so that when we return to javascript through the C entry stub, the exception triggers the registered try-catch handler. You want to
circumvent this by adding a check in the C entry stub. Right?

My question here is: by skipping the try-catch handler, where is that pending
exception handled? I don't see it being cleared anywhere. So even though we
restarted the frame, the old exception is still pending?


https://codereview.chromium.org/22801003/diff/2001/src/ia32/code-stubs-ia32.cc
File src/ia32/code-stubs-ia32.cc (right):

https://codereview.chromium.org/22801003/diff/2001/src/ia32/code-stubs-ia32.cc#newcode4877
src/ia32/code-stubs-ia32.cc:4877: __ cmp(ebp, edx);
Instead of these 4 instructions, you could just

__ cmp(ebp, Operand::StaticVariable(c_entry_frame_to_ignore_exception));
__ mov(Operand::StaticVariable(c_entry_frame_to_ignore_exception),
Immediate(0));

I don't think mov sets any flags, so you can do the conditional jump
afterwards based on the results of cmp.

https://codereview.chromium.org/22801003/diff/2001/src/x64/code-stubs-x64.cc
File src/x64/code-stubs-x64.cc (right):

https://codereview.chromium.org/22801003/diff/2001/src/x64/code-stubs-x64.cc#newcode4022
src/x64/code-stubs-x64.cc:4022: __ cmpq(rbp, rdx);
Similar to ia32.

https://codereview.chromium.org/22801003/

--
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
--- You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to