Closed
Bug 1912623
Opened 1 month ago
Closed 1 month ago
If WebAssembly isn't present, context menus fail and the stop/reload button stops working
Categories
(Firefox :: Translations, defect)
Firefox
Translations
Tracking
()
RESOLVED
DUPLICATE
of bug 1909204
Tracking | Status | |
---|---|---|
firefox-esr115 | --- | unaffected |
firefox-esr128 | --- | fixed |
firefox129 | --- | wontfix |
firefox130 | --- | fixed |
People
(Reporter: spectre, Unassigned)
Details
This appears to have regressed from the introduction of translation support. If running Firefox on a platform without a JIT or an incomplete implementation where WebAssembly support is missing, an uncaught error in toolkit/components/translations/actors/TranslationsParent.sys.mjs
detectSimdSupport()
trying to execute Wasm code will bring down multiple portions of the user interface. Tier-3 systems only, also affects 128ESR. This brief patch fixes it and should not regress tier-1, which I can make into a formal request if it looks good.
diff -r 81fc811c3c39 toolkit/components/translations/actors/TranslationsParent.sys.mjs
--- a/toolkit/components/translations/actors/TranslationsParent.sys.mjs Thu Aug 08 21:26:29 2024 -0700
+++ b/toolkit/components/translations/actors/TranslationsParent.sys.mjs Sat Aug 10 16:45:13 2024 -0700
@@ -618,16 +618,25 @@
* Detect if Wasm SIMD is supported, and cache the value. It's better to check
* for support before downloading large binary blobs to a user who can't even
* use the feature. This function also respects mocks and simulating unsupported
* engines.
*
* @type {boolean}
*/
static getIsTranslationsEngineSupported() {
+ try {
+ // Ensure WebAssembly is supported and enabled (may not be on tier-3).
+ if (!WebAssembly) {
+ return false;
+ }
+ } catch(e) {
+ return false;
+ }
+
if (lazy.simulateUnsupportedEnginePref) {
// Use the non-lazy console.log so that the user is always informed as to why
// the translations engine is not working.
console.log(
"Translations: The translations engine is disabled through the pref " +
'"browser.translations.simulateUnsupportedEngine".'
);
yup, I can confirm this breakage on firefox-128.0.3-1.fc40.ppc64le
Updated•1 month ago
|
status-firefox129:
--- → wontfix
status-firefox130:
--- → fix-optional
status-firefox-esr115:
--- → unaffected
status-firefox-esr128:
--- → affected
Component: Menus → Translations
Updated•1 month ago
|
Updated•29 days ago
|
You need to log in
before you can comment on or make changes to this bug.
Description
•