RESOLVED FIXED 17470
throws are not properly recorded in the console in onreadystatechange
https://bugs.webkit.org/show_bug.cgi?id=17470
Summary throws are not properly recorded in the console in onreadystatechange
Francisco Tolmasky
Reported 2008-02-21 03:16:31 PST
myXMLHTTPRequestObject.onreadystatechange = function () { throw "hello". } This will report "undefined" in the error console, whereas it reports "hello" from everywhere else it could be thrown.
Attachments
test case (559 bytes, text/html)
2008-02-21 06:09 PST, Alexey Proskuryakov
no flags
Alexey Proskuryakov
Comment 1 2008-02-21 06:09:59 PST
Created attachment 19256 [details] test case I'm interested in which cases work though - XMLHttpRequest, XPathEvaluator and a plain timeout all seem to work in the same way.
Francisco Tolmasky
Comment 2 2008-02-21 13:02:49 PST
(In reply to comment #1) > Created an attachment (id=19256) [edit] > test case > > I'm interested in which cases work though - XMLHttpRequest, XPathEvaluator and > a plain timeout all seem to work in the same way. > Just doing <script> throw "yikes" </script> works
Alexey Proskuryakov
Comment 3 2008-02-21 13:28:49 PST
Right - apparently, all callbacks are affected. This looks like an easy fix, but I'd like to look into providing line numbers and getting rid of code duplication at the same time.
Alexey Proskuryakov
Comment 4 2008-03-31 22:58:12 PDT
See also: bug 18232, bug 18234.
Francisco Tolmasky
Comment 5 2008-04-19 01:04:50 PDT
This basically makes debugging in Safari impossible. I really think that this should be a P1 given that any bug you have in any ajax code requires you to do alert debugging essentially.
David Kilzer (:ddkilzer)
Comment 6 2008-05-02 15:27:46 PDT
Francisco Tolmasky
Comment 7 2008-05-02 15:51:35 PDT
thank you kilzer
Oliver Hunt
Comment 8 2008-07-20 05:47:39 PDT
Fixed in r35253
Note You need to log in before you can comment on or make changes to this bug.