Architecture
Introduction to firefox architecture
At a high level, firefox is made of:
- the browser user interface (the main window)
- the web engine, called gecko. Some of its components have been rewritten by using the RUST language.
- the spidermonkey javascript engine
- a set of base components or frameworks: necko, xpcom, etc.
Some components provided by the new servo engine (written in Rust) are:
- webrender, the GPU-based 2D rendering engine
- stylo, the CSS style system
Some major base components or frameworks are:
- xpfe, the mozilla "cross platform Front end" or UI toolkit. It uses XUL, the "XML user interface language", which is interpreted by the browser engine.
- xpcom, the mozilla cross platform component object model
- necko, the network subsystem.
- nss, the Network Security Services
- nspr, the Netscape Portable Runtime. This provides platform independence for non-GUI operating system facilities.
Multiprocess architecture
Multiprocess support was introduced by the Electrolysis project (shortname: e10s). Multiprocess support varies depending on on Firefox versions and platforms.
Electrolysis multiprocess support was first introduced in Firefox 48 release.
Process separation insures:
- Stability / Reliability : if a web page or plug in hangs or crashes, the full browser still continues to run.
- Security : Sandboxing (of web pages or plugins) can rely on native process security / access rights mechanisms.
Hence, the following parts of firefox can run in different processes, depending on the target platform:
- browser UI process (1): the top level window and UI.
- web content processes (1..N): They are in charge of one or several tabs (web pages)
- GPU process: for GPU-based compositing
- Legacy NPAPI plugin processes
- Web Extensions processes
- Media playback process
- Service Worker process