Open-Source Wikis

/

Gecko

/

Lore

mozilla/gecko-dev

Lore

mozilla-central (mirrored here as gecko-dev) is one of the longest-lived continuously-developed codebases on the public web. Some files trace their lineage to Netscape Communicator (1998); others were rewritten last week. This page is a high-level timeline of the eras and the major rewrites that shaped what's in the tree today.

Eras

The Netscape inheritance (Mar 1998 – ~2003)

When Netscape open-sourced Mozilla in March 1998, it shipped a C++ codebase, an XPCOM component model, and an idiosyncratic UI toolkit called XUL. Many of the patterns still visible in xpcom/, widget/, intl/, and nsprpub/ originate here: the nsI interface prefix, reference counting via NS_ADDREF/NS_RELEASE, the IDL toolchain, the mozglue/ early-startup pattern.

Defining events: the original codebase release; the Mozilla 1.0 milestone (June 2002); the eventual Firefox split (Phoenix → Firebird → Firefox in 2002–2004) that focused the browser product separately from the Suite.

The Firefox 1.x – 3.x era (~2004 – 2010)

Firefox 1.0 shipped in November 2004. This era cemented Gecko's chrome model, established the cross-platform widget abstractions in widget/, and grew the JavaScript engine SpiderMonkey from a tree walker into a tracing JIT (TraceMonkey) by Firefox 3.5.

The JIT wars and tab-on-a-process pre-history (~2010 – 2017)

Firefox 4 (2011) introduced JaegerMonkey; Firefox 18 (2013) added IonMonkey. Multiple competing JS JIT tiers grew up under js/src/jit/. Project Electrolysis ("e10s") moved web content into a separate process; the ipc/ directory took shape, IPDL was designed and implemented, and the code base got a process-aware mindset.

Quantum (~2017 – 2018)

A cluster of Rust-based projects landed at once: Stylo replaced the old C++ style system with the Rust-based engine from Servo (servo/components/style/), WebRender replaced the legacy compositor with a GPU-driven Rust renderer (gfx/wr/), and the e10s rollout was completed. SpiderMonkey shipped Baseline + Ion, and the new CacheIR inline-cache architecture began consolidating IC code under js/src/jit/CacheIR*. The browser was rebranded "Firefox Quantum" for a generation of users.

Notable: this is also when the third_party/rust pipeline matured; mach vendor rust is a Quantum-era tool.

Fission and process explosion (~2019 – 2022)

Fission (docshell/, dom/ipc/) shipped site isolation: each origin gets its own content process. The number of process types grew (GPU, RDD, Socket, Utility), and a substantial fraction of dom/ipc/, dom/base/BrowsingContext.cpp, and the WindowGlobal* IPC actors were created or rewritten in this period. The JSActor lightweight IPC pattern was introduced.

Mobile, GeckoView, and Fenix (2018 – present)

The Android browser was rewritten on top of GeckoView, a Kotlin-friendly embedding library (mobile/android/geckoview/). The new app, internally codenamed Fenix, replaced Fennec. Modern mobile code (UI, telemetry via Glean, A/B experiments via Nimbus) lives under mobile/android/.

The Glean era and modern telemetry (~2020 – present)

Telemetry was historically owned by toolkit/components/telemetry/ (legacy histograms, scalars, events). Starting around 2020, the Glean SDK (toolkit/components/glean/, originating in the mobile org) began absorbing all new telemetry. Decommissioning of legacy histograms is ongoing; the snapshotted HEAD commit (Bug 1960567 - remove the last C++ and scriptable APIs to accumulate data to legacy telemetry histograms) reflects a milestone in that migration.

WebDriver BiDi and modern automation (2022 – present)

Automation moved from Mozilla-specific Marionette to standardized WebDriver BiDi, implemented under remote/webdriver-bidi/. The W3C-classic WebDriver path lives in testing/geckodriver/.

Migration to Git (~2023 – present)

For most of its life, mozilla-central was a Mercurial repository at hg.mozilla.org. gecko-dev was a one-way Git mirror generated by Mozilla's hg-to-git bridge. Around 2023, Mozilla announced a project to migrate official development to Git. As of this snapshot, both Mercurial and Git landings flow into the same tree, and gecko-dev is becoming closer to canonical.

Longest-standing features

A few code areas survive nearly unchanged from the early Netscape era:

  • NSPR (nsprpub/) — the OS abstraction layer. Predates C++11 by a decade. Still pervasively used.
  • XPCOM (xpcom/) — the component framework, refcounting macros, threading primitives.
  • The XPIDL toolchain.idl files, the typelib format, xpidl compiler. Legacy but still everywhere.
  • NSS (security/nss/) — Mozilla's TLS/crypto library. Independent project, vendored in.

Major rewrites

Year(s) Rewrite What changed
~2010-2013 TraceMonkey → JaegerMonkey → IonMonkey JS JIT replaced multiple times
~2014-2017 Electrolysis (e10s) Web content moved out of the parent process
~2017 Stylo Rust style engine replaced the C++ one
~2017-2019 WebRender GPU compositor replaced the legacy compositor
~2019-2022 Fission Per-origin process isolation
~2018-2022 XBL → Custom Elements The old XML Binding Language was removed; bindings became Web Components
~2017-2024 Old XUL → HTML chrome Most XUL-only widgets replaced by HTML/XUL hybrids in toolkit/content/widgets/
~2019-2025 Legacy Telemetry → Glean Histograms and scalars being phased out
~2022-present Marionette → WebDriver BiDi Automation protocol modernized
~2023-present Mercurial → Git Source control migration

Deprecated features

  • XBL (XML Binding Language) — Removed. Replaced by Web Components. dom/xbl/ is gone.
  • xpinstall (legacy add-ons) — Pre-WebExtensions add-on system, removed circa 2017. Some nsIXPInstall* interfaces remain as stubs.
  • xpcomgc / cycle collector experiments — Various GC reorganizations; the current cycle collector lives in xpcom/base/nsCycleCollector.cpp.
  • Old image decoders — Decoders for image formats Mozilla once shipped (e.g., MNG) have been removed; current decoders live in image/decoders/.
  • Tab-modal and content prompts (legacy) — Replaced by the modern nsIPromptService and the SubDialog/Dialog actors.
  • xul-app (XULRunner) — The standalone XUL runtime is no longer maintained.
  • PDF.js (in-tree) — Now a Git submodule / vendor drop under toolkit/components/pdfjs/.
  • MathML mfenced — Removed in 2020 per spec change. dom/mathml/ retains the rest.

Growth trajectory

The repo has grown by roughly an order of magnitude in source files since 2002. Significant additions over the years:

  • servo/ (2017): Rust style engine and friends.
  • mobile/android/ (2018+): GeckoView and Fenix host code.
  • gfx/wr/ (2017+): WebRender.
  • remote/ (2018+): CDP and WebDriver BiDi.
  • toolkit/components/glean/ (2020+): Glean telemetry.
  • dom/mls/, security/mls/ (2024+): Messaging Layer Security primitives.
  • dom/onnx/ (2024+): ONNX runtime integration for on-device AI features.

The codebase continues to add Rust components while gradually replacing select C++ subsystems.

Built by Factory AutoWiki from public repository content. It is a generated preview for codebase exploration, not source-maintained documentation.

Lore – Gecko wiki | Factory