Closed Bug 1353081 Opened 8 years ago Closed 8 years ago

Lazily load NetUtil.jsm in Schemas.jsm

Categories

(WebExtensions :: General, defect)

defect
Not set
normal

Tracking

(firefox55 fixed)

RESOLVED FIXED
mozilla55
Tracking Status
firefox55 --- fixed

People

(Reporter: mccr8, Assigned: mccr8)

References

Details

Attachments

(1 file)

NetUtils.jsm is not needed unless readJSON is called, and it doesn't seem to be called in a clean profile. (This is one of the two remaining places in a clean profile that load NetUtils.jsm on startup.)
Well, Schemas.jsm shouldn't be loaded in a clean profile, but we never need NetUtil.jsm in the content process or for most startups.
Ah, that's a good reason to load it lazily then. :)
I locally ran some web extension mochitests. Hopefully that's enough to smoke test a simple change like this.
Summary: Lazily load NetUtils.jsm in Schemas.jsm → Lazily load NetUtil.jsm in Schemas.jsm
Comment on attachment 8854081 [details] Bug 1353081 - Lazily load NetUtil.jsm in Schemas.jsm. https://reviewboard.mozilla.org/r/126064/#review128662 r=me, but please make sure there's no place we're doing NetUtil.newURI that can't be changed to Services.io.newURI. I'm on a phone right now, so can't check myself.
Attachment #8854081 - Flags: review?(kmaglione+bmo) → review+
The two uses of NetUtil in Schemas.jsm are NetUtil.asyncFetch and NetUtil.readInputStreamToString.
Pushed by amccreight@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/8d7dcc765725 Lazily load NetUtil.jsm in Schemas.jsm. r=kmag
Status: NEW → RESOLVED
Closed: 8 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla55
Product: Toolkit → WebExtensions
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: