Open Bug 1890137 Opened 1 month ago Updated 23 days ago

Refresh button won't show after page loaded when WASM is disabled.

Categories

(Firefox :: Translations, defect, P2)

Firefox 124
Desktop
All
defect

Tracking

()

People

(Reporter: theklf4, Unassigned)

Details

Attachments

(1 file)

Attached image wasmconfig.jpg

User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:124.0) Gecko/20100101 Firefox/124.0

Steps to reproduce:

Turned off WASM in flags (as the attached screenshot)

Actual results:

All webpages stuck in showing stop button (as the attached screenshot). (in very small chance (<5%) the refresh button can work)

This annoying issue affect all version 122~124. If I turned on WASM, the issue disappeared. But I can't turn on WASM for security considerations.

Expected results:

The refresh button show after webpage loaded.

Component: Untriaged → General
OS: Unspecified → All
Hardware: Unspecified → Desktop

The Bugbug bot thinks this bug should belong to the 'Core::JavaScript: WebAssembly' component, and is moving the bug to that component. Please correct in case you think the bot is wrong.

Component: General → JavaScript: WebAssembly
Product: Firefox → Core
Component: JavaScript: WebAssembly → General
Product: Core → Firefox

Considering these prefs are (I believe) owned by the WASM gang over in SpiderMonkey-land, I think this bug fits better over in Core :: Javascript: WebAssembly.

Component: General → JavaScript: WebAssembly
Product: Firefox → Core

Managed to reproduce this issue on:

  • Firefox Nightly 126.0a1;
  • Firefox 125.0;

Tested and reproduced on:

  • macOS 12;
  • Windows 10;
  • Ubuntu 22;

Setting as NEW.

Status: UNCONFIRMED → NEW
Ever confirmed: true

The severity field is not set for this bug.
:rhunt, could you have a look please?

For more information, please visit BugBot documentation.

Flags: needinfo?(rhunt)

To reproduce the problem you need two options javascript.options.wasm and javascript.options.wasm_trustedprincipals set to false. Setting only javascript.options.wasm to false does not affect refresh button -- which is disables WebAssembly and shall be enough to turning it off.

(The javascript.options.wasm_trustedprincipals was added by bug 1576254, not really SpiderMonkey-land)

Flags: needinfo?(rhunt)
Severity: -- → S3
Priority: -- → P2

I see the following in the console:

console.error: (new ReferenceError("WebAssembly is not defined", "resource://gre/actors/TranslationsParent.sys.mjs", 2710))

Further I can find the construct return WebAssembly.validate( in the ml/content/Utils.sys.mjs.

Better way will be adding of the following in detect Wasm feature functions (which fixes the refresh button):

--- a/toolkit/components/translations/actors/TranslationsParent.sys.mjs
+++ b/toolkit/components/translations/actors/TranslationsParent.sys.mjs
@@ -2707,6 +2707,7 @@ export class TranslationsParent extends JSWindowActorParent {
  * Validate some simple Wasm that uses a SIMD operation.
  */
 function detectSimdSupport() {
+  if (typeof WebAssembly == "undefined") { return false; }
   return WebAssembly.validate(
     new Uint8Array(
       // ```

I don't know the reason why JavaScript exception in the translation code affects the chrome's buttons.

Component: JavaScript: WebAssembly → Translations
Product: Core → Firefox
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: