mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-11-02 04:27:31 +09:00
Bug 1357075 - Pad a nop to unwind to the scope just before a destructuring iterator close trynote
Issue #74
This commit is contained in:
parent
8af5664922
commit
ac07311b18
7 changed files with 43 additions and 5 deletions
|
|
@ -5318,6 +5318,14 @@ BytecodeEmitter::wrapWithDestructuringIteratorCloseTryNote(int32_t iterDepth, In
|
|||
{
|
||||
MOZ_ASSERT(this->stackDepth >= iterDepth);
|
||||
|
||||
// Pad a nop at the beginning of the bytecode covered by the trynote so
|
||||
// that when unwinding environments, we may unwind to the scope
|
||||
// corresponding to the pc *before* the start, in case the first bytecode
|
||||
// emitted by |emitter| is the start of an inner scope. See comment above
|
||||
// UnwindEnvironmentToTryPc.
|
||||
if (!emit1(JSOP_TRY_DESTRUCTURING_ITERCLOSE))
|
||||
return false;
|
||||
|
||||
ptrdiff_t start = offset();
|
||||
if (!emitter(this))
|
||||
return false;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue