<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#c20">Comment # 20</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:gskachkov&#64;gmail.com" title="GSkachkov &lt;gskachkov&#64;gmail.com&gt;"> <span class="fn">GSkachkov</span></a>
</span></b>
        <pre>(In reply to <a href="show_bug.cgi?id=144955#c17">comment #17</a>)
<span class="quote">&gt; 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>
&gt; Patch
&gt; 
&gt; View in context:
&gt; <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>
&gt; 
&gt; &gt;&gt;&gt;&gt;&gt; Source/JavaScriptCore/parser/Parser.cpp:1203
&gt; &gt;&gt;&gt;&gt;&gt; +            context.setEndOffset(result, m_lastTokenEndPosition.offset);
&gt; &gt;&gt;&gt;&gt; 
&gt; &gt;&gt;&gt;&gt; What is this setEndOffset for?
&gt; &gt;&gt;&gt; 
&gt; &gt;&gt;&gt; Actually, this is wrong. How does this code not segfault?
&gt; &gt;&gt;&gt; setEndOffset is meant to be called with non-null AST nodes
&gt; &gt;&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;&gt; Where ';' is used as end of the statement var f...; and end of arrow function x=&gt;x+10;
&gt; &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; 
&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; &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.
&gt; 
&gt; Right. But, if you look at the code for setEndOffset, it will deference the
&gt; AST node you pass it (inside ASTBuilder, not SyntaxChecker).
&gt; This will be bad because we're passing in null for that AST node.
&gt; 
&gt; On another note, this code path seems a little bit weird to me. Is there an
&gt; alternate
&gt; way to check the end of an arrow function that isn't inside parseStatement? 
&gt; To me, this seems like a weird place for this code to live.</span >

I've checked it seems that this statement is unnecessary. So I've removed it. Tests are still green.</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>