Closed Bug 1447130 Opened 7 years ago Closed 6 years ago

[meta] Component-ify

Categories

(Firefox :: New Tab Page, enhancement)

enhancement
Not set
normal

Tracking

()

RESOLVED FIXED
Firefox 63
Iteration:
63.3 - Aug 6
Tracking Status
firefox60 --- wontfix
firefox61 --- wontfix
firefox63 --- fixed

People

(Reporter: k88hudson, Unassigned)

References

(Blocks 3 open bugs)

Details

(Keywords: meta)

We will need to do this in order to support the Add-ons team removing support for boostrapped addons. There are a few possible ways to do this which we discussed at the San Fran All Hands, including: * migrating to a web extension * migrating away from being a system add-on to being a regular Firefox component
When we talked in the SF, it was the case that loading as a web-extension would likely delay startup in some way, but that the WebExtensions team had bug 1378459 tracking that. That bug just sprouted some proof-of-concept patches; linking to it here.
Blocks: 1449052
Priority: -- → P3
Priority: P3 → --
Severity: normal → enhancement
Iteration: --- → 62.2 - Jun 4
Priority: -- → P2
Priority: P2 → P3
Blocks: 1439892
Iteration: 62.2 - Jun 4 → 62.3 - Jun 18
Iteration: 62.3 - Jun 18 → 63.1 - July 9
Iteration: 63.1 - July 9 → 63.2 - July 23
Iteration: 63.2 - July 23 → 63.3 - Aug 6
The "basic" steps of component-ify-ing is to replace the functionality provided by legacy bootstrap extensions -- in our case, mainly bootstrap.js and install.rdf. (Where we already have a bunch of custom packaging with jar.mn already.) Some functionality can just be removed as we don't need to support uninstalling/reinstalling/upgrading/downgrading a live extension. I believe this is the current lifecycle: 1) activity-stream bootstrap.js is loaded very early as that's when extensions get loaded - this does minimal startup work waiting for "sessionstore-windows-restored" - https://searchfox.org/mozilla-central/source/browser/extensions/activity-stream/bootstrap.js 2) browser.js starts aboutNewTabService from delayedStartup - https://searchfox.org/mozilla-central/rev/28daa2806c89684b3dfa4f0b551db1d099dda7c2/browser/base/content/browser.js#1438-1441 3) aboutNewTabService (on main process) loads/calls AboutNewTab.init() - https://searchfox.org/mozilla-central/source/browser/components/newtab/aboutNewTabService.js 4) AboutNewTab.init() registers RemotePages - this needs to happen early to catch the initial about:home/newtab - https://searchfox.org/mozilla-central/source/browser/modules/AboutNewTab.jsm 5) "sessionstore-windows-restored" triggers a deferred activity stream startup - this loads resource://activity-stream/lib/ActivityStream.jsm and the rest of activity stream - this is deferred to avoid talos sessionrestore - this also finds all potentially loaded modules to unload them on shutdown (so live upgrade of add-on can re-register) 6) activity stream INIT action and other stuff happens - this also handles early about:newtab type pages that RemotePages noticed but ActivityStream.jsm wasn't ready yet … 7) "quit-application-granted" - aboutNewTabService calls its uninit and AboutNewTab.uninit (for main) 8) bootstrap.js shutdown - call activityStream.uninit() to dispatch UNINIT action - unload modules We should be able to move bootstrap.js into AboutNewTab. Details: move (1) bootstrap.js startup related bits into (4) AboutNewTab.init to wait for "sessionstore-windows-restored" and move (5) deferred loading as part of AboutNewTab module. Similarly we can move (8) shutdown to be handled in (7) AboutNewTab.uninit(). I think we can break this transition into some steps by having both bootstrap.js and AboutNewTab coexisting without actually moving browser/extensions/activity-stream at the same time. If we have AboutNewTab handle `new ActivityStream()` and `activityStream.uninit()` as described above, we can leave other extension-specific stuff in bootstrap.js.
Iteration: 63.3 - Aug 6 → ---
Keywords: meta
Priority: P3 → --
Summary: Migrate Activity Stream away from being a bootstrapped add-on → Component-ify
Depends on: 1474406
Depends on: 1474410
Depends on: 1474411
Depends on: 1474414
Depends on: 1474419
Depends on: 1472038
Iteration: --- → 63.4 - Aug 20
All dependent bugs resolved and successfully exported with bug 1478870!
Status: NEW → RESOLVED
Iteration: 63.4 - Aug 20 → 63.3 - Aug 6
Closed: 6 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 63
Component: Activity Streams: Newtab → New Tab Page
Summary: Component-ify → [meta] Component-ify
You need to log in before you can comment on or make changes to this bug.