playwright/browser_patches/firefox/juggler
Andrey Lushnikov e28083974d
browser(firefox): simplify PageTarget lifecycle (#4014)
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.
2020-09-30 02:10:34 -07:00
..
components browser(firefox): roll Firefox to roughly July, 15 (#3411) 2020-08-12 10:09:20 -07:00
content browser(firefox): use browsingContextID for frame IDs (#3999) 2020-09-29 11:22:00 -07:00
pipe browser(firefox): reliably close the pipe (#3280) 2020-08-03 20:15:25 -07:00
protocol browser(firefox): use browsingContextID for frame IDs (#3999) 2020-09-29 11:22:00 -07:00
screencast browser(firefox): autoscale screencast to fit frame (#3720) 2020-09-01 17:10:06 -07:00
Helper.js browser(firefox): remove the hack around setting viewport size (#4010) 2020-09-30 00:36:46 -07:00
jar.mn browser(firefox): use browsingContextID for frame IDs (#3999) 2020-09-29 11:22:00 -07:00
moz.build browser(firefox): implement RemoteDebuggingPipe (#3273) 2020-08-03 13:27:09 -07:00
NetworkObserver.js browser(firefox): use browsingContextID for frame IDs (#3999) 2020-09-29 11:22:00 -07:00
SimpleChannel.js chore: export juggler as a standalone folder for browser build (#2432) 2020-06-02 16:51:13 -07:00
TargetRegistry.js browser(firefox): simplify PageTarget lifecycle (#4014) 2020-09-30 02:10:34 -07:00