[Webkit-unassigned] [Bug 8519] WebCore doesn't fire window.onerror event as much as it should

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Wed Apr 16 09:18:13 PDT 2008


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





------- Comment #13 from aa at google.com  2008-04-16 09:18 PDT -------
On Wed, Apr 16, 2008 at 7:39 AM, Darin Adler <darin at apple.com> wrote:
> That onerror bug report is way too broad. The original claim is that the
> error event isn't supported at all by WebKit, and that's not true. It would
> be helpful to know exactly which types of errors you would find this useful
> for. It might be a straightforward fix. I think your comments in the bug
> might make that clear, but I wasn't completely sure when reading it.

Sorry, we weren't aware that it worked at all because we were interested in
catching runtime javascript errors, which it is not fired for.

Ideally, window.onerror would be called for any uncaught javascript error, and
for any error inside asynchronous native code (eg databases).

Our immediate goal is to implement a unit test system where any error (even
those fired asynchronously) is caught and reported as a test failure. But
window.onerror is also frequently used to implement logging for deployed
applications. For example, Gmail uses this API to catch all errors and report
them back to the server.

And FWIW, I agree with Garrett Smith's comments. It would be great if WebKit
would take the lead here and implement a really useful global error handler
with lots of rich details about what went wrong. If you did not want to break
compatibility with existing users of window.onerror, you could either add a new
API (window.addEventListener("error"), or window.onexception), or just add new
params to the existing signature.


-- 
Configure bugmail: http://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