Reminder - no plan survives breakfast.
- Feel free to send pull requests to the repo!
- Here’s a contributing guide!
- Here’s the guide for creating pull requests that smurfd used and recommends!
Today
- Bug 1736690 - Remove or update probes expiring in Firefox 96: pictureinpicture.most_concurrent_players
- That was easy! Patch posted.
- Questions:
- How is gBrowser and xpcom used? Can you talk about it too?
gBrowser
gBrowser
is the name of the component in a Firefox browser window that manages tabs, and the underlying infrastructure for switching tabs, adding tabs, knowing about tab switches, etc.- Light documentation
gBrowser
is a window-global instance of a component called tabbrowsergBrowser
is a pretty bad name for what it is. Could maybe be calledgTabsManager
orgBrowsersManager
<browser>
, is similar to an<iframe>
g
is for global,a
is for argument,m
is for method,s
is for static,k
is for global constant, ALL_CAPS for global constant- Firefox used to not have tabs! At some point in its lineage, Firefox didn't have tabs. It was one
<browser>
per window.gBrowser
.- They kept the same name when adding tabs! I think this was to make it easier to support XUL add-ons that relied on touching
gBrowser
. The newgBrowser
variable had the same interface as the old one but would forward calls to the currently selected<browser>
.
- They kept the same name when adding tabs! I think this was to make it easier to support XUL add-ons that relied on touching
- Source for reading
- XPCOM
- It's a very old Mozilla technology modeled after COM from Microsoft
- Infrastructure for defining interfaces for components that are implementation-language agnostic
- This means a component written in language A can in theory talk to a component written in language B by way of an interface defined in an (XP)IDL file (.idl)
- The dream was that Mozilla-backed applications could be written in whatever language you wanted so long as it "supported XPCOM/XPConnect".
- XPCOM components these days are written in C++, JavaScript or Rust
- Registry of XPCOM components, and XPCOM component singletons ("services")
- Cc (
Components.classes
),Ci
(Components.interfaces
) - let referrerInfo = Cc["@mozilla.org/referrer-info;1"].createInstance(Ci.nsIReferrerInfo);
- deCOMtamination of the Mozilla source code
- WebIDL Bindings (.webidl)
- https://github.com/mdn/archived-content/tree/main/files/en-us/mozilla/tech/xpcom
- Help us port documentation! From here!
- First find the documentation that you want to port in the GitHub repository
- File a bug blocking this bug
- Follow these instructions to convert the document to an RST file
- Use this example as a template
- Post for review!
- Can you explain the process of writing "These Weeks in Firefox" (from start to finish) ?
- WebExtensions and how they interact with DocShells / BrowsingContexts
- How a patch gets into Firefox, from start to finish!
- How is gBrowser and xpcom used? Can you talk about it too?
Chat
- Join us in the Livehacking room on Mozilla’s Matrix instance! Here’s documentation on how to join. I’m only sorta monitoring the Twitch chat. A bot will try to bridge Matrix and Twitch (joc-bridgebot).
Links
- Alessandro Castellani has been streaming himself livehacking on Thunderbird
- emilio hacks on Firefox!
- Compiler Compiler - watch a Mozilla engineer hack on the SpiderMonkey JavaScript engine!
- How mconley uses Mercurial
- Fission - what is it, and how does it work?
- Andreas Kling hacks on a custom browser engine for a hand-rolled OS called SerenityOS
- The Joy of Coding: Community-Run Episode guide
- Feel free to send pull requests to the repo!
- Here’s the guide for creating pull requests that smurfd used and recommends!
- Check out Josh Marinacci hacking on Firefox Reality, our nascent VR browser!
- I've been mirroring the episodes to YouTube
- Code Therapy with Danny O’Brien
- Watch a developer put together a Windows game from scratch (no third-part engines) - really great explanations: https://handmadehero.org/
- /r/WatchPeopleCode for more livehacking!
Glossary
- BHR - “Background Hang Reporter”, a thing that records information about when Firefox performs poorly and sends it over Telemetry
- e10s ("ee ten ESS") - short for Electrolysis, which is the multi-process Firefox project
- CPOW ("ka-POW" or sometimes "SEE-pow") = Cross-Process Object Wrapper. See this blog post.
- Deserialize - "turn a serialized object back into the complex object”
- Serialize - "turn a complex object into something that can be represented as primitives, like strings, integers, etc
- Regression - something that made behaviour worse rather than better. Regress means to “go backward”, more or less.
- l10n - localization
- a11y - accessibility
- i18n - internationalization
- k8s - kubernetes
Feedback
- @mconley@mastodon.social on Mastodon
- @mike_conley on Twitter
- mconley in IRC on irc.mozilla.org
- mikeconley.ca/blog
- mconley at mozilla dot com