summaryrefslogtreecommitdiff
path: root/www/librewolf/files/patch-js_public_Utility.h
diff options
context:
space:
mode:
authorMartin Filla <freebsd@sysctl.cz>2023-10-07 05:00:00 +0200
committerRobert Clausecker <fuz@FreeBSD.org>2023-10-09 03:40:28 -0400
commita1069e80ec4d0f4bcc69f27b9341815f03cd167f (patch)
treeef2261161b2e41451d006153b22f78516e3bd684 /www/librewolf/files/patch-js_public_Utility.h
parentnet/scamper: update to 20230614c (diff)
www/librewolf: update to 117.0.1-1
With two additional patches to the unity_menu patch due to jsm@. Changelog: https://gitlab.com/librewolf-community/browser/bsys6/-/releases PR: 273948 See also: https://codeberg.org/librewolf/issues/issues/1279 Obtained from: https://people.freebsd.org/~jsm/patch2.diff
Diffstat (limited to 'www/librewolf/files/patch-js_public_Utility.h')
-rw-r--r--www/librewolf/files/patch-js_public_Utility.h35
1 files changed, 35 insertions, 0 deletions
diff --git a/www/librewolf/files/patch-js_public_Utility.h b/www/librewolf/files/patch-js_public_Utility.h
new file mode 100644
index 000000000000..4c2e16bc932c
--- /dev/null
+++ b/www/librewolf/files/patch-js_public_Utility.h
@@ -0,0 +1,35 @@
+commit 57b30241311091b5a6a5a0bb1c19a8e073860fc3
+Author: Christoph Moench-Tegeder <cmt@burggraben.net>
+
+ do not assert on alignment when not having the bits
+
+ the underlying issue seemed to be win-only anyways?
+
+diff --git js/public/Utility.h js/public/Utility.h
+index 0d745e9df785..f0ca7ea37162 100644
+--- js/public/Utility.h
++++ js/public/Utility.h
+@@ -480,6 +480,7 @@ static inline void js_free(void* p) {
+ * Note: Do not add a ; at the end of a use of JS_DECLARE_NEW_METHODS,
+ * or the build will break.
+ */
++#if !defined(__i386__)
+ #define JS_DECLARE_NEW_METHODS(NEWNAME, ALLOCATOR, QUALIFIERS) \
+ template <class T, typename... Args> \
+ QUALIFIERS T* MOZ_HEAP_ALLOCATOR NEWNAME(Args&&... args) { \
+@@ -490,6 +491,15 @@ static inline void js_free(void* p) {
+ return MOZ_LIKELY(memory) ? new (memory) T(std::forward<Args>(args)...) \
+ : nullptr; \
+ }
++#else
++#define JS_DECLARE_NEW_METHODS(NEWNAME, ALLOCATOR, QUALIFIERS) \
++ template <class T, typename... Args> \
++ QUALIFIERS T* MOZ_HEAP_ALLOCATOR NEWNAME(Args&&... args) { \
++ void* memory = ALLOCATOR(sizeof(T)); \
++ return MOZ_LIKELY(memory) ? new (memory) T(std::forward<Args>(args)...) \
++ : nullptr; \
++ }
++#endif
+
+ /*
+ * Given a class which should provide a 'new' method that takes an arena as