[JSC] always wrap AwaitExpression operand in a new Promise
https://bugs.webkit.org/show_bug.cgi?id=165181
Reviewed by Yusuke Suzuki.
JSTests:
* stress/async-await-basic.js:
(async.awaitedPromisesAreWrapped):
Source/JavaScriptCore:
Ensure operand of AwaitExpression is wrapped in a new Promise by
explicitly creating a new Promise Capability and invoking its
resolve callback. This avoids the specified short-circuit for
Promise.resolve().
* builtins/AsyncFunctionPrototype.js:
(globalPrivate.asyncFunctionResume):
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@209113
268f45cc-cd09-0410-ab3c-
d52691b4dbfc