mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-09-30 12:27:29 +09:00
No issue - avoid potential underflow in StructuredClone.
Prevents potential loop-around if there's bogus internal Map data.
This commit is contained in:
parent
5141227896
commit
3bac3ab0b5
1 changed files with 2 additions and 0 deletions
|
|
@ -1700,6 +1700,8 @@ JSStructuredCloneWriter::write(HandleValue v)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
if (cls == ESClass::Map) {
|
if (cls == ESClass::Map) {
|
||||||
|
if (!counts.back())
|
||||||
|
return false;
|
||||||
counts.back()--;
|
counts.back()--;
|
||||||
RootedValue val(context(), entries.back());
|
RootedValue val(context(), entries.back());
|
||||||
entries.popBack();
|
entries.popBack();
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue