Benjamin Smedberg recently discussed the motivation for splitting Firefox into multiple process, so I won’t recap that here. Instead, I want to demonstrate what we’ve accomplished so far. The video below shows our nearly Phase I-complete browser. (Back and Forward don’t work yet, but are relatively easy to add.)
First, I browse around. Nothing particularly exciting there, except that two Firefox programs are running — Firefox itself, and
gecko-iframe. The second program is new: it’s drawing the web pages to the screen. Currently in Firefox, this is all done within the same program.
The fun comes when I
kill -9 this
gecko-iframe, the “tab” containing mozilla.com. To the non-geeky, invoking
kill -9 on a program causes it to crash IMMEDIATELY. This simulates what would happen if, say, you tried to run a buggy plugin and it got itself into trouble. Notice that only the “content” disappears when the page crashes; the user interface itself keeps running as if nothing happened. This is a big step forward! If I were to
kill -9 the current version of Firefox, everything would die, user interface and tabs.
With Firefox protected from buggy pages and plugins, more fun is possible. This video shows me pressing a “Recover” button that relaunches the page that just crashed. There are many more possibilities for recovering from these errors, and I’m excited to see what our user interface folks cook up.
This demo shows off a lot of hard work from Ben Turner, Benjamin Smedberg, Boris Zbarsky, and Joe Drew. (We also have plugins running in their own, separate processes, in an incomplete way. However, the plugins still refuse to draw to the screen and so wouldn’t make for a very good demo.) Drop by #content on IRC or read mozilla.dev.tech.dom if you want to find out more details of what the Electrolysis team is up to.