Closed Bug 986493 Opened 10 years ago Closed 10 years ago

WebApps.jsm imports a bunch of modules on startup

Categories

(Firefox Graveyard :: Web Apps, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED
Firefox 31

People

(Reporter: mak, Assigned: marco)

References

Details

Attachments

(1 file, 2 obsolete files)

Doesn't look like all of the modules imported here are needed on startup (see bug 986323):

http://mxr.mozilla.org/mozilla-central/source/dom/apps/src/Webapps.jsm#36

For example AppDownloadManager.jsm or WebappOSUtils.jsm
I think these may use DefineLazyModuleGetter.

I didn't check what's using WebApps.jsm on startup, though it may be worth to verify what this module does when loaded since that happens.
Also WebappManager.jsm and NativeApp.jsm
Attached patch Patch (obsolete) — Splinter Review
I think these should be the only modules not needed at startup.

WebappManager.jsm is already loaded lazily in nsBrowserGlue.js (in |_finalUIStartup|).
Attachment #8395226 - Flags: review?(felipc)
Attached patch Patch (obsolete) — Splinter Review
There's also a module imported by ActivitiesService.jsm that isn't needed during startup.
Assignee: nobody → mar.castelluccio
Attachment #8395226 - Attachment is obsolete: true
Status: NEW → ASSIGNED
Attachment #8395226 - Flags: review?(felipc)
Attachment #8395228 - Flags: review?(felipc)
The two prefs are basically static, this is why I'm using those to decide whether the modules should be loaded or not.

In particular, I think "dom.webapps.useCurrentProfile" could be replaced by a #ifdef MOZ_B2G.
Attachment #8395228 - Flags: review?(felipc) → review+
Attached patch PatchSplinter Review
I changed my mind, using defineLazyModuleGetter we don't load those modules when not needed and we still support changing those prefs.
Attachment #8395228 - Attachment is obsolete: true
Attachment #8395427 - Flags: review?(felipc)
Attachment #8395427 - Flags: review?(felipc) → review+
Keywords: checkin-needed
https://hg.mozilla.org/mozilla-central/rev/7d430b6ad970
Status: ASSIGNED → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Whiteboard: [fixed-in-fx-team]
Target Milestone: --- → Firefox 31
QA Whiteboard: [qa-]
Product: Firefox → Firefox Graveyard
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: