The Joy of Coding: Episode Guide
Project maintained by
Hosted on GitHub Pages — Theme by mattgraham
Episode 267: Oct 27th, 2021
Links
Topics
- Bug 1736690 - Remove or update probes expiring in Firefox 96: pictureinpicture.most_concurrent_players
- That was easy! Patch posted.
- r? means: request review from
- Mike looks at some of his Needinfos
mach try can some times take time
- Mostly running Python-3.9
- about:memory can be a good place to see where the memory that Firefox uses goes
- modelled vs modeled
- Question time!
- 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 tabbrowser
- gBrowser is a pretty bad name for what it is. Could maybe be called gTabsManager or gBrowsersManager
-
, is similar to an
- 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 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 new gBrowser variable had the same interface as the old one but would forward calls to the currently selected .
- 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!
- Rate this episode
Chat