[Webkit-unassigned] [Bug 93607] Web Inspector: [JSC] Caught exception is treated as uncaught

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Tue Sep 10 00:10:31 PDT 2013


--- Comment #9 from Joseph Pecoraro <joepeck at webkit.org>  2013-09-10 00:09:44 PST ---
(In reply to comment #7)
> (From update of attachment 211132 [details])
> View in context: https://bugs.webkit.org/attachment.cgi?id=211132&action=review
> Thanks, Joe!
> r=me, but please fix the logic error below, and add a test for it.
> > Source/JavaScriptCore/interpreter/Interpreter.cpp:582
> > +        if (!codeBlock)
> > +            return StackVisitor::Done;
> I think you want StackVisitor::Continue here.
> Consider this stack:
>     js function with try/catch scope => Array.prototype.map => js function => throw
> CodeBlock is null for host functions. Therefore, when you see Array.prototype.map, you'll return StackVisitor::Done and conclude that there's no handler. But there is a handler, in the function that called map.

Good catch and thanks for the example! That indeed fixes a issue. It also uncovered a somewhat surprising double pause.


    function exceptionInHostFunction()
        [1].map(function(x) {
            throw "exception in host function";

Setting the inspector to break on all exceptions, and evaluating: setTimeout(exceptionHostFunction, 0);

The inspector pauses twice:

  1. At the throw line. Continuing in Web Inspector goes to (2)
  2. At the [].map line. Continuing in Web Inspector no longer pauses.

I'll take a brief look at this. It exists separate from this issue/patch, but affects the tests I'm writing for this patch.

Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

More information about the webkit-unassigned mailing list