[Webkit-unassigned] [Bug 8519] WebCore doesn't fire window.onerror event when uncaught JavaScript exceptions are thrown

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Wed May 13 23:31:35 PDT 2009


https://bugs.webkit.org/show_bug.cgi?id=8519





------- Comment #25 from eric at webkit.org  2009-05-13 23:31 PDT -------
Actually, looking at this more this looks pretty much useless.  Yes, the
functionality of catching all exceptions is useful, but this callback isn't. 
It doesn't even give you the actual thrown exception.

I don't think this is worth doing.  It can't be a compat concern because the
feature is too weak for sites to actually depend on.  I think it is worth
adding a real error event however.  The worker ErrorEvent does not expose an
exception so that's not a fit.

A non-event way would be to implement an onerror callback which includes the
Exception.  Passing the exception as the first argument would keep "compatible"
arguments[0].toString() behavior even if the type would be different.  I could
also pass the exception as the 4th argument and maintain compatibility.

I still prefer an EventListener as that fits better in our system (and is
something we can define via IDL).  But a callback is also possible (and might
actually be useful if it exposed the actual exception object -- so that
eventually someone might be able to get a stack from it).


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



More information about the webkit-unassigned mailing list