diff options
Diffstat (limited to 'user/firefox-esr/js-endian.patch')
-rw-r--r-- | user/firefox-esr/js-endian.patch | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/user/firefox-esr/js-endian.patch b/user/firefox-esr/js-endian.patch new file mode 100644 index 000000000..44f21d2d1 --- /dev/null +++ b/user/firefox-esr/js-endian.patch @@ -0,0 +1,33 @@ +# HG changeset patch +# User A. Wilcox <AWilcox@Wilcox-Tech.com> +# Date 1729710191 18000 +# Wed Oct 23 14:03:11 2024 -0500 +# Node ID 6102585e0d752de1729135d4c7d917e751b268c5 +# Parent 61f7d9c0998e2ce8008cd15b187f86dfdba21a26 +Bug 1926667 - Ensure JSStructuredCloneReader::readTransferMap respects endianness r?sfink + +Differential Revision: https://phabricator.services.mozilla.com/D226707 + +diff --git a/js/src/vm/StructuredClone.cpp b/js/src/vm/StructuredClone.cpp +--- a/js/src/vm/StructuredClone.cpp ++++ b/js/src/vm/StructuredClone.cpp +@@ -3387,7 +3387,8 @@ bool JSStructuredCloneReader::readTransf + } + + headerPos.write( +- PairToUInt64(SCTAG_TRANSFER_MAP_HEADER, SCTAG_TM_TRANSFERRING)); ++ NativeEndian::swapToLittleEndian( ++ PairToUInt64(SCTAG_TRANSFER_MAP_HEADER, SCTAG_TM_TRANSFERRING))); + + uint64_t numTransferables; + MOZ_ALWAYS_TRUE(in.readPair(&tag, &data)); +@@ -3512,7 +3513,8 @@ bool JSStructuredCloneReader::readTransf + MOZ_ASSERT(TransferableMapHeader(data) == SCTAG_TM_TRANSFERRING); + #endif + headerPos.write( +- PairToUInt64(SCTAG_TRANSFER_MAP_HEADER, SCTAG_TM_TRANSFERRED)); ++ NativeEndian::swapToLittleEndian( ++ PairToUInt64(SCTAG_TRANSFER_MAP_HEADER, SCTAG_TM_TRANSFERRED))); + + return true; + } |