Skip to content
This repository was archived by the owner on Jul 9, 2025. It is now read-only.

Commit 075258e

Browse files
committed
Bug 1676631: Update local slots in SetFrameArgumentsObject r=jandem
Differential Revision: https://phabricator.services.mozilla.com/D96928
1 parent fa32169 commit 075258e

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

js/src/vm/JSScript.cpp

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4725,6 +4725,15 @@ void js::SetFrameArgumentsObject(JSContext* cx, AbstractFramePtr frame,
47254725
frame.unaliasedLocal(frameSlot) = ObjectValue(*argsobj);
47264726
}
47274727
}
4728+
4729+
// JS_OPTIMIZED_ARGUMENTS may also have been stored to a local slot
4730+
// during bailout. Update those local slots.
4731+
for (uint32_t i = 0; i < script->nfixed(); i++) {
4732+
Value& value = frame.unaliasedLocal(i);
4733+
if (value.isMagic() && value.whyMagic() == JS_OPTIMIZED_ARGUMENTS) {
4734+
frame.unaliasedLocal(i) = ObjectValue(*argsobj);
4735+
}
4736+
}
47284737
}
47294738

47304739
/* static */

0 commit comments

Comments
 (0)