Google Chrome
Development Stories
Tony Chang
Google, Inc.
What is Chrome?
Google Chrome is a multi-process web browser that uses
the WebKit rendering engine.
WebKit is a rendering engine that parses HTML. It is used to
power many applications like Safari, Dashboard, Mail, and Google
Chrome.
Browser process
- UI: tab strip, omnibox, menus
- History
- Network
- Manage other processes
- ie., the browser's "chrome"
Renderer process
- Turns HTML into something displayed on the screen
- Image decoding
Task Manager
Chrome comes with a task manager that you can use to see
the processes that are being used.
Process separation
- Try to put each tab into a separate renderer process as often
as possible.
- Most of the time, each tab is it's own process and when you
navigate a tab to a new domain, it spins up a new process.
- Navigating to a page in the same site or opening a tab in the same site
uses the same process.
Example
- However, sometimes tabs have to share a renderer process because
the pages are "connected".
Example
IPC
- Browser process and renderer process send messages back and forth.
We call this inter-process communication.
- Well defined IPC interface: can only send pre-defined messages.
- Basically a function call across processes.
Sandbox
- No disk access
- No direct network access
- No direct clipboard access
- No access to windowing system (e.g. no X access on Linux)
Sandbox
- The assumption is that there will be web exploitable bugs when rendering
web pages. For example, bugs in zlib, libpng, libxml or in the javascript
engine.
- A corrupt renderer process can still make IPC calls back to the browser,
so we try to make the IPC interface resiliant.
- A corrupt renderer can still make network requests,
get passwords and get clipboard contents.
File Size Whitelist
Theme install
Decoding images in the browser process is
risky, so we use a sandboxed utility process.
Credits
- WebKit open source project
- S5: A Simple
Standards-Based Slide Show System
- pre3d: A JavaScript
3d Rendering Engine
- Inkscape: A Vector Graphics
Editor
Commit Stats
Since Sept 2, 2008 (not including WebKit):
- Commits: 23059
- Commiters: 203
- External contributors: 50
In the last 30 days (not including WebKit):
- Commit rate: 82 commits per day
- 12975 files changed, 502437 insertions(+),
137013 deletions(-)
stats generated using git
Code Stats
- 3762 C and C++ files
- 3461 header files
- 1828 C++ files in WebKit (WebCore)
- 1744 header files in WebKit (WebCore)