<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugs.webkit.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4.1"
          urlbase="https://bugs.webkit.org/"
          
          maintainer="admin@webkit.org"
>

    <bug>
          <bug_id>17470</bug_id>
          
          <creation_ts>2008-02-21 03:16:31 -0800</creation_ts>
          <short_desc>throws are not properly recorded in the console in onreadystatechange</short_desc>
          <delta_ts>2008-07-20 05:47:39 -0700</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>WebCore JavaScript</component>
          <version>528+ (Nightly build)</version>
          <rep_platform>Mac</rep_platform>
          <op_sys>OS X 10.5</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords>InRadar</keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Francisco Tolmasky">tolmasky</reporter>
          <assigned_to name="Alexey Proskuryakov">ap</assigned_to>
          <cc>ap</cc>
    
    <cc>jchaffraix</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>71375</commentid>
    <comment_count>0</comment_count>
    <who name="Francisco Tolmasky">tolmasky</who>
    <bug_when>2008-02-21 03:16:31 -0800</bug_when>
    <thetext>myXMLHTTPRequestObject.onreadystatechange = function () { throw &quot;hello&quot;. }

This will report &quot;undefined&quot; in the error console, whereas it reports &quot;hello&quot; from everywhere else it could be thrown.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>71384</commentid>
    <comment_count>1</comment_count>
      <attachid>19256</attachid>
    <who name="Alexey Proskuryakov">ap</who>
    <bug_when>2008-02-21 06:09:59 -0800</bug_when>
    <thetext>Created attachment 19256
test case

I&apos;m interested in which cases work though - XMLHttpRequest, XPathEvaluator and a plain timeout all seem to work in the same way.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>71417</commentid>
    <comment_count>2</comment_count>
    <who name="Francisco Tolmasky">tolmasky</who>
    <bug_when>2008-02-21 13:02:49 -0800</bug_when>
    <thetext>(In reply to comment #1)
&gt; Created an attachment (id=19256) [edit]
&gt; test case
&gt; 
&gt; I&apos;m interested in which cases work though - XMLHttpRequest, XPathEvaluator and
&gt; a plain timeout all seem to work in the same way.
&gt; 
Just doing
&lt;script&gt;
throw &quot;yikes&quot;
&lt;/script&gt;

works</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>71419</commentid>
    <comment_count>3</comment_count>
    <who name="Alexey Proskuryakov">ap</who>
    <bug_when>2008-02-21 13:28:49 -0800</bug_when>
    <thetext>Right - apparently, all callbacks are affected.

This looks like an easy fix, but I&apos;d like to look into providing line numbers and getting rid of code duplication at the same time.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>76031</commentid>
    <comment_count>4</comment_count>
    <who name="Alexey Proskuryakov">ap</who>
    <bug_when>2008-03-31 22:58:12 -0700</bug_when>
    <thetext>See also: bug 18232, bug 18234.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>78240</commentid>
    <comment_count>5</comment_count>
    <who name="Francisco Tolmasky">tolmasky</who>
    <bug_when>2008-04-19 01:04:50 -0700</bug_when>
    <thetext>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.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>79496</commentid>
    <comment_count>6</comment_count>
    <who name="David Kilzer (:ddkilzer)">ddkilzer</who>
    <bug_when>2008-05-02 15:27:46 -0700</bug_when>
    <thetext>&lt;rdar://problem/5908156&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>79502</commentid>
    <comment_count>7</comment_count>
    <who name="Francisco Tolmasky">tolmasky</who>
    <bug_when>2008-05-02 15:51:35 -0700</bug_when>
    <thetext>thank you kilzer</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>86459</commentid>
    <comment_count>8</comment_count>
    <who name="Oliver Hunt">oliver</who>
    <bug_when>2008-07-20 05:47:39 -0700</bug_when>
    <thetext>Fixed in r35253</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="0"
              isprivate="0"
          >
            <attachid>19256</attachid>
            <date>2008-02-21 06:09:59 -0800</date>
            <delta_ts>2008-02-21 06:09:59 -0800</delta_ts>
            <desc>test case</desc>
            <filename>onreadystatechange-throw.html</filename>
            <type>text/html</type>
            <size>559</size>
            <attacher name="Alexey Proskuryakov">ap</attacher>
            
              <data encoding="base64">PHNjcmlwdD4KICAgIHZhciByZXEgPSBuZXcgWE1MSHR0cFJlcXVlc3Q7CiAgICByZXEub25yZWFk
eXN0YXRlY2hhbmdlID0gZnVuY3Rpb24gKCkgeyB0aHJvdyAib25yZWFkeXN0YXRlY2hhbmdlIjsg
fQogICAgcmVxLm9wZW4oIkdFVCIsICJvbnJlYWR5c3RhdGVjaGFuZ2UtdGhyb3cuaHRtbCIpOwog
IAogICAgc2V0VGltZW91dChmdW5jdGlvbigpIHsgdGhyb3cgInRpbWVvdXQiOyB9LCAwKTsKCiAg
ICBmdW5jdGlvbiBNeU5TUmVzb2x2ZXIoKSB7fQogICAgTXlOU1Jlc29sdmVyLnByb3RvdHlwZS5s
b29rdXBOYW1lc3BhY2VVUkkgPSBmdW5jdGlvbihwcmVmaXgpIHsKICAgICAgICB0aHJvdyAiTlNS
ZXNvbHZlciI7CiAgICB9CgogICAgdHJ5IHsKICAgICAgICBkb2N1bWVudC5ldmFsdWF0ZSgiZm9v
OmNoaWxkL3RleHQoKSIsIGRvY3VtZW50LmRvY3VtZW50RWxlbWVudCwgbmV3IE15TlNSZXNvbHZl
ciwgCiAgICAgICAgICAgIFhQYXRoUmVzdWx0Lk9SREVSRURfTk9ERV9JVEVSQVRPUl9UWVBFLCBu
dWxsKTsKICAgIH0gY2F0Y2ggKGV4KQogICAgewogICAgfQoKPC9zY3JpcHQ+Cg==
</data>

          </attachment>
      

    </bug>

</bugzilla>