Blob Blame History Raw
From a95105b7846c29c5bd3868719621ab3679d9932b Mon Sep 17 00:00:00 2001
From: rpm-build <rpm-build>
Date: Sat, 7 Sep 2019 21:45:58 +0200
Subject: [PATCH] jsproperty-endian.patch

Bug 1543659 - fix JSPropertySpec::ValueWrapper on 64-bit big-endian platforms

Add some padding to make the union's int32 member correspond to the
low-order bits of the string member.  This fixes TypedArray tests on
s390x.
---
 js/src/jsapi.h | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/js/src/jsapi.h b/js/src/jsapi.h
index 0f11787f6..f1c084f6a 100644
--- a/js/src/jsapi.h
+++ b/js/src/jsapi.h
@@ -1581,7 +1581,14 @@ struct JSPropertySpec {
     uintptr_t type;
     union {
       const char* string;
+#if MOZ_BIG_ENDIAN && JS_BITS_PER_WORD == 64
+      struct {
+        uint32_t padding;
+        int32_t int32;
+      };
+#else
       int32_t int32;
+#endif
     };
   };
 
-- 
2.23.0