As of today, we create `PageTarget` instances whenever we get a sync IPC from the content process. This, however, breaks an invariant that `browserContext.pages` always has all pages (and *browsing contexts* - not to be confused with *browser contexts*), associated with browser context. This invariant will be especially important when we move user agent emulation to browser-side. This patch makes `PageTarget` lifecycle symmetrical: - `PageTarget` instance is created when tab is opened - `PageTarget` is destroyed when tab is crashed or closed This should also fix a bunch of race conditions with persistent mode, since sometimes we arrive to the window after its initialization. Drive-by: straighten viewport management and put a nice descriptive comment. |
||
|---|---|---|
| .. | ||
| juggler | ||
| patches | ||
| preferences | ||
| .gitignore | ||
| archive.sh | ||
| build.sh | ||
| BUILD_NUMBER | ||
| cheatsheet.md | ||
| clean.sh | ||
| install-preferences.js | ||
| UPSTREAM_CONFIG.sh | ||