--- a/js/src/js-cxxflags.mozbuild.orig	2022-10-25 09:20:11.000000000 -0700
+++ b/js/src/js-cxxflags.mozbuild	2022-11-06 19:05:40.789483797 -0800
@@ -16,3 +16,17 @@ if CONFIG['CC_TYPE'] in ('clang', 'gcc')
 # https://gcc.gnu.org/bugzilla/show_bug.cgi?id=50044
 if CONFIG['CC_TYPE'] == 'gcc':
     CXXFLAGS += ['-Wno-attributes']
+
+if CONFIG["CC_TYPE"] in ("clang"):
+    # Prevent audio from muting always.  Breaks with -Ofast.
+    CXXFLAGS += [
+        "__OFLAG_SAFE__",
+        "-fno-fast-math",
+    ]
+
+if CONFIG["CC_TYPE"] in ("gcc"):
+    # Prevent audio from muting always.  Breaks with -Ofast.
+    CXXFLAGS += [
+        "__OFLAG_SAFE__",
+        "-fno-fast-math",
+    ]
