summaryrefslogtreecommitdiff
path: root/js/public/Utility.h
diff options
context:
space:
mode:
authorMoonchild <moonchild@palemoon.org>2023-09-01 15:44:29 +0200
committerMoonchild <moonchild@palemoon.org>2023-09-01 15:44:29 +0200
commit2d48de9998d5c4f768af051ce997777be126f8cd (patch)
treec6023db91bfadaa8e1d7c4c12d90ad63bf810454 /js/public/Utility.h
parent3b029cdfe482e5097ee09fa1998591faf9c1005b (diff)
parentee97a5dad40fb8d207b717cb2a0d487f54dd5f1d (diff)
downloaduxp-bbe265f0b5cf6fa882c9425ffe1dd020c02c03f9.tar.gz
Merge branch 'master' into releaseRC_20230901RB_20230904
Diffstat (limited to 'js/public/Utility.h')
-rw-r--r--js/public/Utility.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/js/public/Utility.h b/js/public/Utility.h
index cadcef7000..dbe69e18c0 100644
--- a/js/public/Utility.h
+++ b/js/public/Utility.h
@@ -14,6 +14,7 @@
#include "mozilla/Scoped.h"
#include "mozilla/TemplateLib.h"
#include "mozilla/UniquePtr.h"
+#include "mozilla/WrappingOperations.h"
#include <stdlib.h>
#include <string.h>
@@ -539,7 +540,7 @@ ScrambleHashCode(HashNumber h)
* are stored in a hash table; see Knuth for details.
*/
static const HashNumber goldenRatio = 0x9E3779B9U;
- return h * goldenRatio;
+ return mozilla::WrappingMultiply(h, goldenRatio);
}
} /* namespace detail */