<?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>23611</bug_id>
          
          <creation_ts>2009-01-28 21:44:38 -0800</creation_ts>
          <short_desc>Multiline Javascript comments cause incorrect parsing of following script.</short_desc>
          <delta_ts>2011-06-16 18:53:45 -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>JavaScriptCore</component>
          <version>528+ (Nightly build)</version>
          <rep_platform>PC</rep_platform>
          <op_sys>All</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc>http://bugs.ecmascript.org/ticket/414</bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords>HasReduction, InRadar</keywords>
          <priority>P2</priority>
          <bug_severity>Minor</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>0</everconfirmed>
          <reporter name="Mike Samuel">msamuel</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>barraclough</cc>
    
    <cc>kangax</cc>
    
    <cc>oliver</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>107455</commentid>
    <comment_count>0</comment_count>
    <who name="Mike Samuel">msamuel</who>
    <bug_when>2009-01-28 21:44:38 -0800</bug_when>
    <thetext>Chapter 5.1.2 of the recently approved ES3.1 spec, and the corresponding language from ES 262 say
&quot;A MultiLineComment? (that is, a comment of the form &quot;/* ... */&quot; regardless of whether it spans more than one line) is likewise simply discarded if it contains no line terminator, but if a MultiLineComment? contains one or more line terminators, then it is replaced with a single line terminator, which becomes part of the stream of inputs for the syntactic grammar.&quot; 

But the below returns 2 on Safari, when it should return 1.
(function () { a: for (;;) { for (;;) { break/*
 */a; } return 1; } return 2; })()

By way of explanation, the comment between break and a should introduce a newline, which since break is a restricted production, should cause it to break without a label (out of the inner loop), instead of breaking to the label a (the outer loop).</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>107464</commentid>
    <comment_count>1</comment_count>
    <who name="Mark Rowe (bdash)">mrowe</who>
    <bug_when>2009-01-28 23:07:49 -0800</bug_when>
    <thetext>&lt;rdar://problem/6538820&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>192434</commentid>
    <comment_count>2</comment_count>
    <who name="kangax">kangax</who>
    <bug_when>2010-02-22 06:01:22 -0800</bug_when>
    <thetext>This is still an issue (as of r55043)

A simple example demonstrating WebKit non-conformance in regards to replacing LineTerminator-containing multiline comment with LineTerminator:

(function(){
  return/*
  */1
})();

Expected: `undefined` Actual: `1`</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>196153</commentid>
    <comment_count>3</comment_count>
    <who name="kangax">kangax</who>
    <bug_when>2010-03-04 11:29:11 -0800</bug_when>
    <thetext>Still happens in rev 55516.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>299467</commentid>
    <comment_count>4</comment_count>
    <who name="kangax">kangax</who>
    <bug_when>2010-10-26 08:11:27 -0700</bug_when>
    <thetext>Oh wow. This one is still in r70429.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>422379</commentid>
    <comment_count>5</comment_count>
    <who name="Gavin Barraclough">barraclough</who>
    <bug_when>2011-06-16 18:53:45 -0700</bug_when>
    <thetext>Fixed in r89100</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>