Open Bug 2020773 Opened 6 days ago Updated 5 days ago

userScripts in MV2 sandbox does not have a fix for the structuredClone regression

Categories

(WebExtensions :: General, defect, P1)

defect

Tracking

(firefox148 unaffected, firefox149 affected, firefox150 affected)

Tracking Status
firefox148 --- unaffected
firefox149 --- affected
firefox150 --- affected

People

(Reporter: robwu, Assigned: rpl)

References

Details

(Whiteboard: [addons-jira])

bug 2017797 fixed the regression for structuredClone in content scripts and the sandbox of user scripts registered through the MV3 userScripts API.

But the fix was not applied to the sandbox of userScripts API from MV2.

For completeness and future reference, here is an overview of Cu.Sandbox instances in extensions that interact with content:

Examples of unit tests that trigger the creation of such sandboxes and verify the execution within can be seen in the patch to bug 1912587 at https://phabricator.services.mozilla.com/D219142

  • test_Document_parseHTML_and_parseHTMLUnsafe tests content scripts
  • test_Document_parseHTML_in_mv2_userscript_sandbox tests MV2 user script sandbox.
  • test_Document_parseHTML_in_mv3_userscript_sandbox tests MV3 user script sandbox.

The original regression was introduced in Firefox 149 by bug 2013389, setting status flags accordingly.

P1 because we want to get the fix in the same release as the other fix (uplift to beta).

The number of extensions using the MV2 user scripts API is relatively low (especially in comparison to content scripts), but nevertheless for sanity the behaviors should be identical.

Assignee: nobody → lgreco
Whiteboard: [addons-jira]
Severity: -- → S4
Priority: -- → P1
You need to log in before you can comment on or make changes to this bug.