Adds GetManager on JSWindowActor (returns the associated WindowGlobalActor),
and IsInProcess on WindowGlobalActor (returns whether the actor is in process
or not).
Differential Revision: https://phabricator.services.mozilla.com/D57358
--HG--
extra : moz-landing-system : lando
Whenever media session's metadata changes in the content process, we would like to propogate the updated metadata to the media controller in the parent process in order to show that in the virtual media control interface, which would only be set in the chrome process.
Differential Revision: https://phabricator.services.mozilla.com/D64846
--HG--
extra : moz-landing-system : lando
Given that we are going to add ContentBlockingAllowList in
CookieSettings, so CookieSettings will be responsible for more stuff than the
cookie behavior and cookie permission. We should use a proper name to
reflect the purpose of it. The name 'CookieSettings' is misleading that
this is only for cookie related stuff. So, we decide to rename
'CookieSettins' to 'CookieJarSettings' which serves better meaning here.
Differential Revision: https://phabricator.services.mozilla.com/D63935
--HG--
rename : netwerk/cookie/CookieSettings.cpp => netwerk/cookie/CookieJarSettings.cpp
rename : netwerk/cookie/nsICookieSettings.idl => netwerk/cookie/nsICookieJarSettings.idl
extra : moz-landing-system : lando
Since safe area insets uses on content, we need send it from chrome process to
content process.
SafeAreaInsetsChanged will be called per window position/size change (Next
patch is Android implementation for it), we have to calculate safe area insets
on widget/window per change.
Current implementation is that this value is top level document only like Blink
since https://github.com/w3c/csswg-drafts/issues/4670 isn't resolved yet.
Differential Revision: https://phabricator.services.mozilla.com/D55084
--HG--
extra : moz-landing-system : lando
Since safe area insets uses on content, we need send it from chrome process to
content process.
SafeAreaInsetsChanged will be called per window position/size change (Next
patch is Android implementation for it), we have to calculate safe area insets
on widget/window per change.
Current implementation is that this value is top level document only like Blink
since https://github.com/w3c/csswg-drafts/issues/4670 isn't resolved yet.
Differential Revision: https://phabricator.services.mozilla.com/D55084
--HG--
extra : moz-landing-system : lando
Now that we're guaranteed to not have an existing ClientSource in the old process, we no longer need to allocate a new ClientInfo in the new process.
This lets us just create a ClientSource around the ClientInfo already on the channel (exactly as we do for same-process loads), and we no longer need to reconcile changes with the parent.
Differential Revision: https://phabricator.services.mozilla.com/D63808
--HG--
extra : moz-landing-system : lando
Forgot a negation in the assertion check. Ideally, this should be squashed with a previous patch
but this would require backouting a patch for a one-character change, so adding this patch separately.
Differential Revision: https://phabricator.services.mozilla.com/D63321
--HG--
extra : moz-landing-system : lando
This covers most cycle collected objects which support weak references, but
not the ones which inherit from a cycle collected class and don't do any cycle
collection on their own.
Differential Revision: https://phabricator.services.mozilla.com/D63962
--HG--
extra : moz-landing-system : lando
These were the worrisome missing null checks I noticed, and crash-stat shows that there areactually crashes in these two places
Differential Revision: https://phabricator.services.mozilla.com/D64162
--HG--
extra : moz-landing-system : lando
Based on crash stats the crash is null+offset, and I think the issue can happen during closing down
BrowserChild if there is a pending RecvSizeModeChanged message.
The crash has been there for ages, I think since bug 1104916
Note, BrowserChild::RecvUpdateDimensions does have a null check for the document.
Differential Revision: https://phabricator.services.mozilla.com/D63963
--HG--
extra : moz-landing-system : lando
These serializers have been superceded by the new
MaybeDiscarded<BrowsingContext> and MaybeDiscarded<WindowContext> serializers
added in earlier parts.
Differential Revision: https://phabricator.services.mozilla.com/D62838
--HG--
extra : moz-landing-system : lando
Adds a new MaybeDiscarded wrapper type which allows sending a maybe-discarded
BrowsingContext over IPC to another process which must be explicitly checked for
nullness and discarded status before being used.
Differential Revision: https://phabricator.services.mozilla.com/D62832
--HG--
extra : moz-landing-system : lando
In order to generate media default metadata, we need to know document's title in the media session controller.
Therefore, store this property in `WindowGlobal` to allow we access document's title in chrome process.
Differential Revision: https://phabricator.services.mozilla.com/D62534
--HG--
extra : moz-landing-system : lando
`OtherPid()` release asserts when the process has not connected.
Since `MarkAsDead` is called under both success and failure conditions, we must
ensure that we are running under a success condition (ie, we successfully
started but are now shutting down) before we call into `GeckoProcessManager`.
Note that, in the failure case, `GeckoProcessManager` is already aware that the
process is not alive by virtue of the fact that it was responsible for creating
the process in the first place; it already saw the failure.
Differential Revision: https://phabricator.services.mozilla.com/D63551
--HG--
extra : moz-landing-system : lando
This removes the need for explicit #ifdef NS_BUILD_REFCNT_LOGGING without
introducing user-defined destructors when it is not defined.
Also, some uses of virtual for declaring destructors are replaced by the
appropriate override declaration through these changes.
Differential Revision: https://phabricator.services.mozilla.com/D62604
--HG--
extra : moz-landing-system : lando
This removes the need for explicit #ifdef NS_BUILD_REFCNT_LOGGING without
introducing user-defined destructors when it is not defined.
Also, some uses of virtual for declaring destructors are replaced by the
appropriate override declaration through these changes.
Differential Revision: https://phabricator.services.mozilla.com/D62604
--HG--
extra : moz-landing-system : lando
The default method implementations cause problems when trying to
override them with different types in a direct call class.
For the `Recv__delete__` case there's a simple solution: omit it if
there are any arguments, because it doesn't make much sense to specify
arguments and then completely ignore them, and the no-arg case isn't a
problem for overriding.
Differential Revision: https://phabricator.services.mozilla.com/D62977
--HG--
extra : moz-landing-system : lando
The rejection process consumes the ErrorResult, so an rvalue reference is the honest thing here.
Differential Revision: https://phabricator.services.mozilla.com/D62632
--HG--
extra : moz-landing-system : lando
So that we can get the correct client offset value and store other metrics
there and reuse them when the top browser window moves.
The client offset, browser window title bar and window decorated frame width,
is necessary to get element positions in OOP iframes in screen coordinates
for drag-and-drop etc.
This change also fixes event.screen{X,Y}. A mochitest in this commit fails
without this change with enabling fission at least on Linux. Note that in the
mochitest we have to use nsIDOMWindowUtils.synthesizeNativeMouseClick instead
of nsIDOMWindowUtils.sendMouseEvent since sendMouseEvent doesn't work in fission
world (bug 1528935).
Differential Revision: https://phabricator.services.mozilla.com/D62190
--HG--
extra : moz-landing-system : lando
Update media session status from the content process to the chrome process in order to track all alive media session.
Differential Revision: https://phabricator.services.mozilla.com/D60936
--HG--
extra : moz-landing-system : lando
Collecting this telemetry will let us fix the large messages, if they
are common.
Differential Revision: https://phabricator.services.mozilla.com/D57879
--HG--
extra : moz-landing-system : lando
In out-of-process iframes, the refresh driver for the iframe process doesn't
trigger the UpdateIntersectionObservation function in cases where ancestor
document's viewports change because there is no way to know it happens inside
the iframe process. So instead, we trigger the function in
BrowserChild::RecvChildToParentMatrix which is called in response to APZ.
Differential Revision: https://phabricator.services.mozilla.com/D61937
--HG--
extra : moz-landing-system : lando
clang-10 hits a -Werror in IPDL headers about Principal's copy constructor not being explicitly defined. We could go and fix that constructor, but in light of bug 1443956, I'm guessing it's not really a bad thing to have a discouragement against Principal when nsIPrincipal is now usable directly.
Differential Revision: https://phabricator.services.mozilla.com/D62284
--HG--
extra : moz-landing-system : lando
Now, this method returns simply the result of of `IsMozBrowserElement()`.
In the old days, We used to have IsMozBrowserElement and IsMozBrowserOrApp,
where the latter was true if we had a mozapp or mozbrowser.
But with b2g removed, the app thing went away.
`IsMozBrowser()` is less used than `IsMozBrowserElement()`.
I think the former should be replaced by the later one.
Differential Revision: https://phabricator.services.mozilla.com/D61699
--HG--
extra : moz-landing-system : lando
There are all sorts of lifecycle issues which arise from making DocShell
responsible for discarding BrowsingContexts. In this particular bug, we tend
to run into them in cases where we create a BrowsingContext for a FrameLoader,
and then never create a DocShell for it, leading to it never being destroyed.
But there are myriad other issues as well.
This patch moves the responsibility for BrowsingContext lifecycle management
to the FrameLoader/FrameLoaderOwner, rather than the DocShell, which makes
things more consistent, and more closely aligns with spec-defined behavior.
Differential Revision: https://phabricator.services.mozilla.com/D59008
--HG--
extra : moz-landing-system : lando