<html>
    <head>
      <base href="https://bugs.webkit.org/" />
    </head>
    <body>
      <p>
        <div>
            <b><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - [ES6] Implement ES6 arrow function syntax. Parser of arrow function with execution as common function"
   href="https://bugs.webkit.org/show_bug.cgi?id=144955#c17">Comment # 17</a>
              on <a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - [ES6] Implement ES6 arrow function syntax. Parser of arrow function with execution as common function"
   href="https://bugs.webkit.org/show_bug.cgi?id=144955">bug 144955</a>
              from <span class="vcard"><a class="email" href="mailto:saambarati1&#64;gmail.com" title="Saam Barati &lt;saambarati1&#64;gmail.com&gt;"> <span class="fn">Saam Barati</span></a>
</span></b>
        <pre>Comment on <span class="bz_obsolete"><a href="attachment.cgi?id=253195&amp;action=diff" name="attach_253195" title="Patch">attachment 253195</a> <a href="attachment.cgi?id=253195&amp;action=edit" title="Patch">[details]</a></span>
Patch

View in context: <a href="https://bugs.webkit.org/attachment.cgi?id=253195&amp;action=review">https://bugs.webkit.org/attachment.cgi?id=253195&amp;action=review</a>

<span class="quote">&gt;&gt;&gt;&gt;&gt; Source/JavaScriptCore/parser/Parser.cpp:1203
&gt;&gt;&gt;&gt;&gt; +            context.setEndOffset(result, m_lastTokenEndPosition.offset);
&gt;&gt;&gt;&gt; 
&gt;&gt;&gt;&gt; What is this setEndOffset for?
&gt;&gt;&gt; 
&gt;&gt;&gt; Actually, this is wrong. How does this code not segfault?
&gt;&gt;&gt; setEndOffset is meant to be called with non-null AST nodes
&gt;&gt; 
&gt;&gt; Hmm, I run this method to set correct ending of the block for arrow function with expression for instance var f = x =&gt; x + 10; 
&gt;&gt; Where ';' is used as end of the statement var f...; and end of arrow function x=&gt;x+10;
&gt;&gt; For the same purpose as in this method <a href="https://github.com/WebKit/webkit/blob/master/Source/JavaScriptCore/parser/Parser.cpp#L1426">https://github.com/WebKit/webkit/blob/master/Source/JavaScriptCore/parser/Parser.cpp#L1426</a>
&gt; 
&gt; As for now I've created issue where is implemented lexical bind of 'this' and raising exception in case of trying use arrow function with new <a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - [ES6] Implement ES6 arrow function syntax. Arrow function specific features. Lexical bind of this"
   href="show_bug.cgi?id=144956">https://bugs.webkit.org/show_bug.cgi?id=144956</a>, 
&gt; also I've add new one        <a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - [ES6] Arrow function syntax. Arrow function specific features. Lexical bind &quot;arguments&quot;, &quot;super&quot;, &quot;new.target&quot;"
   href="show_bug.cgi?id=145132">https://bugs.webkit.org/show_bug.cgi?id=145132</a> and will add one more later.</span >

Right. But, if you look at the code for setEndOffset, it will deference the AST node you pass it (inside ASTBuilder, not SyntaxChecker).
This will be bad because we're passing in null for that AST node.

On another note, this code path seems a little bit weird to me. Is there an alternate
way to check the end of an arrow function that isn't inside parseStatement? 
To me, this seems like a weird place for this code to live.</pre>
        </div>
      </p>
      <hr>
      <span>You are receiving this mail because:</span>
      
      <ul>
          <li>You are the assignee for the bug.</li>
      </ul>
    </body>
</html>