diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-21 18:34:58 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-21 18:34:58 +0000 |
commit | 1d5bb90cb0a1b457570019845fed207faed67a99 (patch) | |
tree | d95f8ea0fb9c9c4eb9ae55c70faa2bc02a7bcea4 /js/src/vm | |
parent | Adding upstream version 115.9.1esr. (diff) | |
download | firefox-esr-647942fa887222a841bec4bfb10ffec54eb7ef2f.tar.xz firefox-esr-647942fa887222a841bec4bfb10ffec54eb7ef2f.zip |
Adding upstream version 115.10.0esr.upstream/115.10.0esr
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'js/src/vm')
-rw-r--r-- | js/src/vm/BigIntType.h | 1 | ||||
-rw-r--r-- | js/src/vm/StructuredClone.cpp | 2 |
2 files changed, 2 insertions, 1 deletions
diff --git a/js/src/vm/BigIntType.h b/js/src/vm/BigIntType.h index c8e264b20b..fe70d0cf69 100644 --- a/js/src/vm/BigIntType.h +++ b/js/src/vm/BigIntType.h @@ -398,6 +398,7 @@ class BigInt final : public js::gc::CellWithLengthAndFlags { static JSLinearString* toStringGeneric(JSContext* cx, Handle<BigInt*>, unsigned radix); + friend struct ::JSStructuredCloneReader; // So it can call the following: static BigInt* destructivelyTrimHighZeroDigits(JSContext* cx, BigInt* x); bool absFitsInUint64() const { return digitLength() <= 64 / DigitBits; } diff --git a/js/src/vm/StructuredClone.cpp b/js/src/vm/StructuredClone.cpp index 7eafc89113..1ba63c7fee 100644 --- a/js/src/vm/StructuredClone.cpp +++ b/js/src/vm/StructuredClone.cpp @@ -2489,7 +2489,7 @@ BigInt* JSStructuredCloneReader::readBigInt(uint32_t data) { if (!in.readArray(result->digits().data(), length)) { return nullptr; } - return result; + return JS::BigInt::destructivelyTrimHighZeroDigits(context(), result); } static uint32_t TagToV1ArrayType(uint32_t tag) { |