[Webkit-unassigned] [Bug 166919] New: "this" missing after await in async arrow function
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Tue Jan 10 23:59:47 PST 2017
https://bugs.webkit.org/show_bug.cgi?id=166919
Bug ID: 166919
Summary: "this" missing after await in async arrow function
Classification: Unclassified
Product: WebKit
Version: WebKit Nightly Build
Hardware: Unspecified
OS: Unspecified
Status: NEW
Severity: Normal
Priority: P2
Component: JavaScriptCore
Assignee: webkit-unassigned at lists.webkit.org
Reporter: hszhsh at icloud.com
My test code is as follows.
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();
--
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.webkit.org/pipermail/webkit-unassigned/attachments/20170111/2ef6a24e/attachment-0001.html>
More information about the webkit-unassigned
mailing list