Closed Bug 1909204 Opened 2 months ago Closed 2 months ago

v128 shows all right click menu items (WASM false)

Categories

(Firefox :: Translations, defect)

Firefox 128
defect

Tracking

()

RESOLVED FIXED
130 Branch
Tracking Status
firefox-esr128 --- fixed
firefox130 --- fixed

People

(Reporter: mareh85601, Assigned: gregtatum)

References

Details

Attachments

(3 files)

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

Steps to reproduce:

Use Mozilla Firefox v128.0 (64 bit Windows desktop) without add-ons or anything
Go to about:config and set javascript.options.wasm to false.
Restart Firefox
Open a new empty tab (or any site) and right click in the body.

Actual results:

The right click context menu opens and contains all possible items. See attached screenshot.

Expected results:

The right click context menu should show only relevant items.
For example, the video items should only be listed when right clicking on a video.

Notes:
In previous verions this worked fine.
When javascript.options.wasm starts true and it set to false, the context menu functions fine. It seems wasm is required for initialisation while it was not required in previous versions.

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: Untriaged → JavaScript: WebAssembly
Product: Firefox → Core

From the description, this does not sound like an issue with WebAssembly execution, but with something in the frontend ceasing to work when WebAssembly is not available.

For the reporter, if you go to the menu > more tools > browser console, do you see any interesting messages that could point to which part of the browser UI is going wrong when wasm is disabled?

Component: JavaScript: WebAssembly → Untriaged
Flags: needinfo?(mareh85601)
Product: Core → Firefox

Yes, this console shows error messages.

ReferenceError: WebAssembly is not defined
    detectSimdSupport resource://gre/actors/TranslationsParent.sys.mjs:2737
    getIsTranslationsEngineSupported resource://gre/actors/TranslationsParent.sys.mjs:644
    _updateElementsForContentType chrome://browser/content/browser.js:3752
    onStateChange chrome://browser/content/browser.js:3492
    XWB_onUpdateCurrentBrowser chrome://browser/content/browser.js:3965
    callListeners chrome://browser/content/tabbrowser/tabbrowser.js:1027
    _callProgressListeners chrome://browser/content/tabbrowser/tabbrowser.js:1041
    updateCurrentBrowser chrome://browser/content/tabbrowser/tabbrowser.js:1298
    _setupEventListeners chrome://browser/content/tabbrowser/tabbrowser.js:6157
    set selectedIndex chrome://global/content/elements/tabbox.js:236
    set selectedPanel chrome://global/content/elements/tabbox.js:246
    set selectedIndex chrome://global/content/elements/tabbox.js:599
    set selectedItem chrome://global/content/elements/tabbox.js:617
    set selectedTab chrome://global/content/elements/tabbox.js:80
    set selectedTab chrome://browser/content/tabbrowser/tabbrowser.js:467
    _blurTab chrome://browser/content/tabbrowser/tabbrowser.js:4653
    _beginRemoveTab chrome://browser/content/tabbrowser/tabbrowser.js:4233
    removeTab chrome://browser/content/tabbrowser/tabbrowser.js:4093
    on_click chrome://browser/content/tabbrowser/tabs.js:305
    handleEvent chrome://browser/content/tabbrowser/tabs.js:1858
tabbrowser.js:1032:23
Flags: needinfo?(mareh85601)
Attached image errors.png
Component: Untriaged → Translations
Flags: needinfo?(gtatum)
Assignee: nobody → gtatum
Status: UNCONFIRMED → ASSIGNED
Ever confirmed: true
Flags: needinfo?(gtatum)
Pushed by gtatum@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/b8a0d41a27f5 Wrap Translations WebAssembly detection in a try/catch; r=translations-reviewers,nordzilla
Severity: -- → S3

[Tracking Requested - why for this release]:

Status: ASSIGNED → RESOLVED
Closed: 2 months ago
Resolution: --- → FIXED
Target Milestone: --- → 130 Branch
Flags: qe-verify+
Duplicate of this bug: 1912623

Comment on attachment 9416327 [details]
Bug 1909204 - Wrap Translations WebAssembly detection in a try/catch; r?#translations-reviewers!

ESR Uplift Approval Request

  • If this is not a sec:{high,crit} bug, please state case for ESR consideration: This fixes breakage of the context menu, and is a simple try/catch fix for a runtime error.
  • User impact if declined: Context menu will be broken.
  • Fix Landed on Version:
  • Risk to taking this patch: Low
  • Why is the change risky/not risky? (and alternatives if risky): It adds a try/catch for an unexpected runtime error.
Attachment #9416327 - Flags: approval-mozilla-esr128?

Comment on attachment 9416327 [details]
Bug 1909204 - Wrap Translations WebAssembly detection in a try/catch; r?#translations-reviewers!

Approved for 128.2esr

Attachment #9416327 - Flags: approval-mozilla-esr128? → approval-mozilla-esr128+

I attempted to verify the fix but couldn't reproduce the original issue following the steps provided in the Description. I tested on Windows 10 x64 with Firefox 128 (Build ID: 20240704121409), Firefox 128.0.3 (Build ID: 20240725162350), and Nightly 130.0a1 (Build ID: 20240726035627).

Greg, could you please let me know if there are any additional steps or settings required for me to reproduce the initial issue?

Flags: needinfo?(gtatum)

Hmm... the steps outlined seem reasonable. The only other thing to verify is that in the steps to reproduce it's actually showing the context menu "Translate Selection to English" as that's the codepath that was triggering the error.

Flags: needinfo?(gtatum)

I am also not able to reproduce in Windows 10 build 19045.4780 or Windows 11 build 22631.4037 with Firefox Release v128.0.2 (20240722223746) or Firefox v129.0.2 (20240819150008). The long list of context menu options is not showing, only the relevant ones and the Translate Selection to English or Translate Link Text to English are shown in both the affected and unaffected versions while the mentioned error is not seen in the Console. The issue could not be reproduced.

Removing the qe-verify + flag as QA can't validate de fix without being able to reproduce the initial issue.

Flags: qe-verify+
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: