<?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>35451</bug_id>
          
          <creation_ts>2010-02-26 14:06:35 -0800</creation_ts>
          <short_desc>Inspector and debugger line numbers are different between Safari and Chrome</short_desc>
          <delta_ts>2014-01-28 14:01:44 -0800</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>Web Inspector (Deprecated)</component>
          <version>528+ (Nightly build)</version>
          <rep_platform>PC</rep_platform>
          <op_sys>OS X 10.5</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>INVALID</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Julie Parent">jparent</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>bburg</cc>
    
    <cc>pfeldman</cc>
    
    <cc>pmuellr</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>194278</commentid>
    <comment_count>0</comment_count>
    <who name="Julie Parent">jparent</who>
    <bug_when>2010-02-26 14:06:35 -0800</bug_when>
    <thetext>For multi-line statements, Safari uses the line number from the last line, and Chrome uses the line number from the first line.

For example, given the following:
&lt;html&gt;
&lt;head&gt;
    &lt;script&gt;
     throw(&apos;which line number am i?&apos; +
     &apos;I start on line 4&apos; +
     &apos; but end on line 6&apos;);
    &lt;/script&gt;
&lt;/head&gt;
&lt;body&gt;
&lt;/body&gt;
&lt;/html&gt;

Safari will list the error and stop the debugger pointing to line 6, whereas chrome will point to line 4.

My intuition is that the first line is more what developers would expect.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>198290</commentid>
    <comment_count>1</comment_count>
    <who name="Patrick Mueller">pmuellr</who>
    <bug_when>2010-03-10 13:10:15 -0800</bug_when>
    <thetext>This is surely a V8 vs JSC issue, no?  Change component?

Since this type of behaviour - line number reporting for exceptions - is totally unspec&apos;d w/r/t ECMAScript, it&apos;s not clear which one is &quot;right&quot;, but I agree stopping at the &quot;first line of the statement&quot; is more intuitive.  

It would also be nice to try this in FF; I tried it but couldn&apos;t get FB to generate ANY line number information.  But my FB foo is weak these days, maybe I did something wrong.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>