<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#c5">Comment # 5</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:hszhsh@icloud.com" title="shuan zhao <hszhsh@icloud.com>"> <span class="fn">shuan zhao</span></a>
</span></b>
<pre>I see this issue is solved, but there's another problem. I have updated the test code:
function runSomething(callback) {
callback();
}
class Test {
testFunc() {
this.prop = "123";
runSomething(async () => {
console.log("callback " + this.prop); // It's ok here
await sleep(2);
console.log("callback end " + this.prop); // TypeError: undefined is not an object (evaluating 'this.prop')
});
}
}
let t = new Test();
t.testFunc();
Is it another bug? The code above is ok with V8.</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>