mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-09-07 00:08:39 +09:00
js: check bi before using it in JSStructuredCloneWriter::writeBigInt()
This commit is contained in:
parent
bf90272692
commit
de916190fd
1 changed files with 2 additions and 0 deletions
|
|
@ -1079,6 +1079,8 @@ JSStructuredCloneWriter::writeString(uint32_t tag, JSString* str)
|
|||
bool
|
||||
JSStructuredCloneWriter::writeBigInt(uint32_t tag, BigInt* bi)
|
||||
{
|
||||
if (!bi)
|
||||
return false;
|
||||
bool signBit = bi->isNegative();
|
||||
size_t length = bi->digitLength();
|
||||
// The length must fit in 31 bits to leave room for a sign bit.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue