mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-09-08 16:58:38 +09:00
Bug 1331092 - Part 11: Await on the innerResult.value when innerResult.done is true in yield*.
Tag #1287
This commit is contained in:
parent
9379133c2d
commit
9cecb72f37
1 changed files with 9 additions and 0 deletions
|
|
@ -8896,6 +8896,10 @@ BytecodeEmitter::emitYieldStar(ParseNode* iter)
|
|||
return false;
|
||||
if (!emitAtomOp(cx->names().value, JSOP_GETPROP)) // ITER OLDRESULT FTYPE FVALUE VALUE
|
||||
return false;
|
||||
if (isAsyncGenerator) {
|
||||
if (!emitAwait()) // ITER OLDRESULT FTYPE FVALUE VALUE
|
||||
return false;
|
||||
}
|
||||
if (!emitPrepareIteratorResult()) // ITER OLDRESULT FTYPE FVALUE VALUE RESULT
|
||||
return false;
|
||||
if (!emit1(JSOP_SWAP)) // ITER OLDRESULT FTYPE FVALUE RESULT VALUE
|
||||
|
|
@ -8988,6 +8992,11 @@ BytecodeEmitter::emitYieldStar(ParseNode* iter)
|
|||
if (!emitAtomOp(cx->names().value, JSOP_GETPROP)) // VALUE
|
||||
return false;
|
||||
|
||||
if (isAsyncGenerator) {
|
||||
if (!emitAwait()) // VALUE
|
||||
return false;
|
||||
}
|
||||
|
||||
MOZ_ASSERT(this->stackDepth == startDepth - 1);
|
||||
|
||||
return true;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue