On 2014/06/11 15:07:22, kozyatinskiy wrote:
On 2014/06/11 14:33:37, Yang wrote:
> https://codereview.chromium.org/264333007/diff/150001/src/debug.cc
> File src/debug.cc (left):
>
>
https://codereview.chromium.org/264333007/diff/150001/src/debug.cc#oldcode2705
> src/debug.cc:2705: if (was_in_scope && (after_compile_flags &
> SEND_WHEN_DEBUGGING) == 0) return;
> Is it guaranteed that when this method is called from CompileToplevel,
we
are
> not in the debug scope? If not, this will change behavior.
There are next three lines of code (2267-2671) in base version:
if (in_debug_scope() || ignore_events()) return;
HandleScope scope(isolate_);
bool was_in_scope = in_debug_scope();
If in_debug_scope() is true, then we will leave the function and do
nothing.
Otherwise, was_in_scope is false, and condition (was_in_scope &&
(after_compile_flags & SEND_WHEN_DEBUGGING) == 0) is false, too.
Variable was_in_scope is always false.
Could behavior was changed earlier patches?
I see. Makes sense.
>
> https://codereview.chromium.org/264333007/diff/150001/src/parser.cc
> File src/parser.cc (right):
>
>
https://codereview.chromium.org/264333007/diff/150001/src/parser.cc#newcode3863
> src/parser.cc:3863: isolate()->Throw(*result, &location);
> Won't Debug::OnException trigger as well? The call to
Debug::OnCompileError
> doesn't actually contain the syntax error location, right? So you would
need
the
> following Debug::OnException to get the actual syntax error location,
right?
A
> split API like that is kind of weird.
Yes, I need the following Debug::OnException. But it is important to
distinguish
between an Exception like SyntaxError and compilation errors. Event
CompileError
dual event AfterCompile and provides information about the script to
debugger.
Now I'm a bit confused. Aren't syntax errors a subset of compilation
errors? In
any case, wouldn't you know the current script object from the previous
OnBeforeCompile event? It sounds to me that what we ideally want is to have
the
script object piggybacked onto the OnException event.
https://codereview.chromium.org/264333007/
--
--
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/d/optout.