Closed Bug 1812141 Opened 1 year ago Closed 1 year ago

Convert JSMs in browser/components/attribution to ESMs

Categories

(Firefox :: Installer, task)

task

Tracking

()

RESOLVED FIXED
112 Branch
Tracking Status
firefox112 --- fixed

People

(Reporter: kpatenio, Assigned: portiawuu)

References

(Blocks 2 open bugs)

Details

(Whiteboard: [esmification-timeline])

Attachments

(1 file)

Assignee: nobody → portiawuu
Blocks: calstate
Component: XPConnect → Installer
Product: Core → Firefox
Whiteboard: [esmification-timeline]
Pushed by mconley@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/0d0223fcdc02
Convert JSMs in browser/components/attribution to ESMs. r=mconley,kpatenio,nalexander

Backed out changeset 0d0223fcdc02 (Bug 1812141) for xpcshelll failures on test_ClientEnvironment.js.
Backout link
Push with failures <--> X2
Failure Log

Flags: needinfo?(portiawuu)

The error occurs because of this assertion: https://searchfox.org/mozilla-central/rev/5ccb73c0217d1710b10d6e6e297cf3396d10ec23/toolkit/components/utils/test/unit/test_ClientEnvironment.js#82-83. If we read the entire message for the error caught in the catch block, it reads: "Error: Failed to load resource:///modules/AttributionCode.sys.mjs". The test expects a failure, but it appears that the error type changes a bit after conversion to an ESM. So the assertion fails because we're assuming a NS error result; instead we're just reading "Error". There's already support for ns errors though, as suggested, for example, by: https://searchfox.org/mozilla-central/rev/5ccb73c0217d1710b10d6e6e297cf3396d10ec23/js/xpconnect/tests/unit/test_import_es6_modules.js#22,29.

I suspect the fix is to update the assertion for that test in unit/test_ClientEnvironment.js by ensuring that ex.result == Cr.NS_ERROR_FILE_NOT_FOUND instead.

Flags: needinfo?(portiawuu)
Pushed by mconley@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/1bd87c32d41b
Convert JSMs in browser/components/attribution to ESMs. r=mconley,kpatenio,nalexander
Status: NEW → RESOLVED
Closed: 1 year ago
Resolution: --- → FIXED
Target Milestone: --- → 112 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: