<html>
    <head>
      <base href="https://bugs.webkit.org/" />
    </head>
    <body>
      <p>
        <div>
            <b><a class="bz_bug_link 
          bz_status_RESOLVED  bz_closed"
   title="RESOLVED FIXED - Calling async arrow function which is in a class's member function will cause error"
   href="https://bugs.webkit.org/show_bug.cgi?id=166879#c6">Comment # 6</a>
              on <a class="bz_bug_link 
          bz_status_RESOLVED  bz_closed"
   title="RESOLVED FIXED - Calling async arrow function which is in a class's member function will cause error"
   href="https://bugs.webkit.org/show_bug.cgi?id=166879">bug 166879</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=166879#c5">comment #5</a>)
<span class="quote">&gt; I see this issue is solved, but there's another problem. I have updated the
&gt; test code:
&gt; 
&gt; function runSomething(callback) {
&gt;         callback();
&gt; }
&gt; 
&gt; class Test {
&gt;         testFunc() {
&gt;                 this.prop = &quot;123&quot;;
&gt;                 runSomething(async () =&gt; {
&gt;                         console.log(&quot;callback &quot; + this.prop); // It's ok here
&gt;                         await sleep(2);
&gt;                         console.log(&quot;callback end &quot; + this.prop); // TypeError: undefined is not
&gt; an object (evaluating 'this.prop')
&gt;                 });
&gt;         }
&gt; }
&gt; 
&gt; let t = new Test();
&gt; t.testFunc();
&gt; 
&gt; Is it another bug? The code above is ok with V8.</span >

Yeah, unfortunately it is another bug. Async arrow function 'lost' _this_, by some reason, during restore state after await.</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>