Hello,

TL;DR: BrowserGlue is much smaller now, actors are in browser/components/DesktopActorRegistry.sys.mjs <https://hg-edge.mozilla.org/mozilla-central/diff/f4235b1a035ca9a5292509bb3adcc152412d130b/browser/components/DesktopActorRegistry.sys.mjs>, profile data upgrade handling goes in browser/components/ProfileDataUpgrader.sys.mjs <https://hg-edge.mozilla.org/mozilla-central/diff/5db151ccad4f42bd58c28cb23c49ad6942baba63/browser/components/ProfileDataUpgrader.sys.mjs> . Some smaller other bits have also moved. Apologies if my changes <https://bugzilla.mozilla.org/show_bug.cgi?id=1958070> have caused you conflicts/rebases!

Longer version:

If you've ever had to either create/change JSWindowActor or JSProcessActors used by Desktop Firefox, or had to rename a preference or otherwise move data so users upgrading Firefox kept their settings while the implementation of those settings changed, you will know that these things lived in BrowserGlue <https://searchfox.org/mozilla-central/source/browser/components/BrowserGlue.sys.mjs> - along with quite a lot of other "stuff". Those lists combined with the other stuff meant the file was more than 5000 lines of JS, it was hard to find things, and it felt like a dumping ground.

I'm in the process of splitting things out to individual modules, so that:

- it's easier to find things
- testing should become easier
- we can avoid spending time loading some of this code early on startup if we don't need it - responsibilities are more clearly distributed, instead of all intertwined in this one giant file

The actor lists and profile data upgrading code ("_migrateUI" if that rings bells!) have now been moved out, along with quite a few other things <https://bugzilla.mozilla.org/show_bug.cgi?id=1958070>. I have patches pending review to also move browser places initialization, some OS integration code, and to switch initialization mechanisms waiting for the first browser window to take advantage of category manager registration <https://firefox-source-docs.mozilla.org/browser/CategoryManagerIndirection.html> instead of a long list of hardcoded `MyModule.init()` calls inside BrowserGlue. Other folks are working <https://bugzilla.mozilla.org/show_bug.cgi?id=1959616> on splitting out some of the other goop that doesn't need to live in this file.

Again, apologies if this refactoring has required you to do annoying rebase work - but hopefully this makes the code more maintainable going forward. Thank you to everyone who's dealt with the chunky reviews.

~ Gijs

--
You received this message because you are subscribed to the Google Groups 
"dev-platform@mozilla.org" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to dev-platform+unsubscr...@mozilla.org.
To view this discussion visit 
https://groups.google.com/a/mozilla.org/d/msgid/dev-platform/4d8a1b98-16b6-4463-9d26-8c87da6004a5%40gmail.com.

Reply via email to