It may happen that reload leads to a cross-origin redirect. This PR adds instrumentation to the policy check that triggers new web process creation and allows the client side properly track the navigation progress after reload.
Pretty-diff: 753967002c
References: #16147
Turns out Firefox mach does not respect `DEBIAN_FRONTEND=noninteractive`
command and insists on interactive input for the mozbuild folder
creation.
Pre-creation of the folder avoid this codepath.
This patch introduces independent docker-based build environments for WebKit and Firefox
browsers.
To launch an interactive session inside the environment:
```sh
./browser_patches/docker/cli.sh webkit-debian-11 build # builds image
./browser_patches/docker/cli.sh webkit-debian-11 enter # launches interactive container
```
This roll moves Juggler component registration to a new system that
is used in XPCOM: this is what both RemoteAgent and Marionette use.
Drive-by: we now have to explicitly pass default values to dispatched
mouse events to avoid a `MOZ_ASSERT` trigger inside a drag service
native code.
Manual conflict resolutions: ab3ed0cb2c
Patch by @dpino
Fixes the following error on Ubuntu 18:
```
[716/8153] Linking CXX shared library lib/libmbmalloc.so
FAILED: lib/libmbmalloc.so
: && <CXX> -fPIC -fdiagnostics-color=always -Wextra -Wall -pipe -Wno-odr -Wno-stringop-overflow -Wno-nonnull -Wno-array-bounds -Wno-expansion-to-defined -Wno-noexcept-type -Wno-psabi -Wno-misleading-indentation -Wno-maybe-uninitialized -Wwrite-strings -Wundef -Wpointer-ari>
/usr/bin/ld: Source/bmalloc/CMakeFiles/bmalloc.dir/libpas/src/libpas/pas_deallocate.c.o: relocation R_X86_64_PC32 against symbol `pas_segregated_page_deallocation_did_fail' can not be used when making a shared object; recompile with -fPIC
/usr/bin/ld: final link failed: Bad value
```
Pretty-diff: a479046919
* nsIScreencastServiceClient is not thread safe refcounted so we make nsScreencastService::Session a thread safe refcounted object and keep it alive while there are inflight frames. Once such frames get handled on the main thread we check if the session has been stopped.
* Removed mCaptureCallbackCs in favor of atomic counter (mClient is not accessed only on the main thread).
* HeadlessWindowCapturer now holds RefPtr to the headless window object to avoid use after free when clearing it as a listener on the widget.
* ScreencastEncoder is not ref counted anymore.
Pretty-diff: 5f5042ff1e