No issue - avoid potential underflow in StructuredClone.

Prevents potential loop-around if there's bogus internal Map data.
This commit is contained in:
Moonchild 2025-02-16 19:35:29 +01:00 • committed by roytam1
commit 3bac3ab0b5

View file

@ -1700,6 +1700,8 @@ JSStructuredCloneWriter::write(HandleValue v)
return false;
if (cls == ESClass::Map) {
if (!counts.back())
return false;
counts.back()--;
RootedValue val(context(), entries.back());
entries.popBack();