Closed Bug 1375188 Opened 7 years ago Closed 7 years ago

Don't import TextEncoder from osfile.jsm in CoverageUtils.jsm

Categories

(Testing :: Code Coverage, defect)

Version 3
defect
Not set
normal

Tracking

(firefox56 fixed)

RESOLVED FIXED
mozilla56
Tracking Status
firefox56 --- fixed

People

(Reporter: mccr8, Assigned: mccr8)

References

Details

Attachments

(1 file)

CoverageUtils.jsm contains this code: const {TextEncoder, OS} = Cu.import("resource://gre/modules/osfile.jsm", ccov_scope); this._encoder = new TextEncoder(); However, the WebIDL interface for TextEncoder has Exposed=System, so TextEncoder should be available on the JSM global. (This code was added in Dec 2015, and TextEncoder has had System since at least Nov 2014, so it was probably unnecessary the entire time.) I'm making this change because this style of importing globals from JSMs will break with bug 1186409. I can also revert the part of bug 1348103 that moved the initialization of _encoder to later. I retriggered the XPCShell suite that contains the test that bug 1348103 was fixing and it looks okay: https://treeherder.mozilla.org/#/jobs?repo=try&revision=b68186f6eaeba9357919d205c9498582a984fce1
Thanks for taking care of this :mccr8!
Comment on attachment 8880072 [details] Bug 1375188 - Don't import TextEncoder from osfile.jsm in CoverageUtils.jsm. https://reviewboard.mozilla.org/r/151416/#review156444 rs=me
Attachment #8880072 - Flags: review?(gijskruitbosch+bugs) → review+
Pushed by amccreight@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/6399592c5aca Don't import TextEncoder from osfile.jsm in CoverageUtils.jsm. r=Gijs
Status: NEW → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla56
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: