Name Description Size
AsyncTabSwitcher.sys.mjs The tab switcher is responsible for asynchronously switching tabs in e10s. It waits until the new tab is ready (i.e., the layer tree is available) before switching to it. Then it unloads the layer tree for the old tab. The tab switcher is a state machine. For each tab, it maintains state about whether the layer tree for the tab is available, being loaded, being unloaded, or unavailable. It also keeps track of the tab currently being displayed, the tab it's trying to load, and the tab the user has asked to switch to. The switcher object is created upon tab switch. It is released when there are no pending tabs to load or unload. The following general principles have guided the design: 1. We only request one layer tree at a time. If the user switches to a different tab while waiting, we don't request the new layer tree until the old tab has loaded or timed out. 2. If loading the layers for a tab times out, we show the spinner and possibly request the layer tree for another tab if the user has requested one. 3. We discard layer trees on a delay. This way, if the user is switching among the same tabs frequently, we don't continually load the same tabs. It's important that we always show either the spinner or a tab whose layers are available. Otherwise the compositor will draw an entirely black frame, which is very jarring. To ensure this never happens when switching away from a tab, we assume the old tab might still be drawn until a MozAfterPaint event occurs. Because layout and compositing happen asynchronously, we don't have any other way of knowing when the switch actually takes place. Therefore, we don't unload the old tab until the next MozAfterPaint event. 47023
content 767 588
NewTabPagePreloading.sys.mjs This module is in charge of preloading 'new tab' pages for use when the user opens a new tab. 6294
OpenInTabsUtils.sys.mjs Utility functions that can be used when opening multiple tabs, that can be called without any tabbrowser instance. 2331
TabsList.sys.mjs Populate the popup with menuitems and setup the listeners. 14932
TabUnloader.sys.mjs -*- mode: js; indent-tabs-mode: nil; js-indent-level: 2 -*- 16436
triage.json 1434