Two places read the value of mIsInitialized: nsJSContext::IsContextInitialized()
and nsJSContext::InitContext(). The former is never called. The latter is called
once, with an nsJSContext that just had its mInitialized field set to false, so
the check will always succeed. Because nothing meaningfully reads the value of
the field, we can delete the field and everything that uses it.
Differential Revision: https://phabricator.services.mozilla.com/D34947
--HG--
extra : moz-landing-system : lando
This patch adds the ability to load cross domain iframes in the
background to make the top level documents finish earlier.
This is an experiment feature that we'll keep it disabled by default.
Differential Revision: https://phabricator.services.mozilla.com/D24938
--HG--
extra : moz-landing-system : lando
It's only moved around, but not actually used anywhere.
I have no idea what this was supposed to control in the past but it doesn't seem
useful to keep it around.
Differential Revision: https://phabricator.services.mozilla.com/D33393
--HG--
extra : moz-landing-system : lando
We want to ensure the RDM browser's outer window sizes are not affected as the page is zoomed in or out. In the context of RDM, the size of the browser window will be the same as the viewport so I believe it's safe to assume that the window's outer size will be equal to its inner size when the zoom level is set to 100%.
I found we can get this value by using the presentation context's `GetDeviceZullZoom` method and applying it to the inner sizes of the RDM viewport.
Differential Revision: https://phabricator.services.mozilla.com/D32778
--HG--
extra : moz-landing-system : lando
It appears that in some cases we can have the wrong value for the
WindowGlobalParent::DocumentURI. This patch adds another case in SetNewDocument
which should ideally catch the case where the Document is replaced while
preserving the inner window.
Differential Revision: https://phabricator.services.mozilla.com/D33081
--HG--
extra : moz-landing-system : lando
This bug will use the browsing context to notify content tab to mute/unmute media, instead of using MessageManager. We would use the top level canonical browsing context to
set the media mute property for the top level window and propagate it to other top level windows in other processes.
If we don't do so, we're not able to mute/unmute media in the different process when we we enable Fission, because the current way we use can only notify one process and would cause the media on other process can't be muted/unmuted.
Differential Revision: https://phabricator.services.mozilla.com/D32077
--HG--
extra : moz-landing-system : lando
We store newInnerGlobal in a Rooted, so as long as we expose on all codepaths
that assign to that variable (which with this patch we do, typically via
GetWrapper() calls), there's no need to expose explicitly.
Differential Revision: https://phabricator.services.mozilla.com/D29718
--HG--
extra : moz-landing-system : lando
Marking GetGlobalJSObject and GetGlobalJSObjectPreserveColor final and inline
on inner/outer windows allows compilers to de-virtualize and inline them, which
makes them just as fast as calling FastGetGlobalJSObject is now (in the case of
GetGlobalJSObjectPreserveColor; GetGlobalJSObject has to do the gray-unmarking,
which is a bit more work).
In WindowDestroyedEvent::Run we want to switch to GetGlobalJSObject(), because
we want to root the object and hence should unmark gray.
In nsGlobalWindowInner::RunTimeoutHandler we likewise want to unmark gray. The
AutoEntryScript constructor likely did that already, but it's not that
expensive when it doesn't need to do any work.
Differential Revision: https://phabricator.services.mozilla.com/D29711
--HG--
extra : moz-landing-system : lando
This can be used in things like assertions or some other rare circumstances
where not exposing the object to active JS is OK.
Differential Revision: https://phabricator.services.mozilla.com/D29704
--HG--
extra : moz-landing-system : lando
There is the following usage of nsIPresShell:
```
nsCOMPtr<nsIPresShell> presShell = do_QueryReferent(mPresShellWeak);
```
So, for changing this to:
```
RefPtr<PresShell> presShell = do_QueryReferent(mPresShellWeak);
```
PresShell should have its own IID.
Differential Revision: https://phabricator.services.mozilla.com/D29197
--HG--
extra : moz-landing-system : lando
`CapturingContentInfo` struct is used only in `PresShell.cpp` so that we can
make it a private struct of `PresShell` if we move all users of them,
i.e., API to access them, from `nsIPresShell` to `PresShell`.
Differential Revision: https://phabricator.services.mozilla.com/D29111
--HG--
extra : moz-landing-system : lando
We don't need to flush layout in the parent document if the parent and child
documents can't observe each other.
This will also match our behavior in a Fission world.
I'm not attached to the name of the function, better ideas welcome.
Differential Revision: https://phabricator.services.mozilla.com/D28217
We don't need to flush layout in the parent document if the parent and child
documents can't observe each other.
This will also match our behavior in a Fission world.
I'm not attached to the name of the function, better ideas welcome.
Differential Revision: https://phabricator.services.mozilla.com/D28217
This patch creates new header, `mozilla/PresShellForwards.h`. It should have
all forward declarations of global class/struct in `nsIPresShell.h` and
`mozilla/PresShell.h`.
Additionally, this moves all `enum`s and `constant`s in them into the new file
with changing them to `enum class`es.
This will make other headers which require only specific types in the header
files not include them.
Differential Revision: https://phabricator.services.mozilla.com/D28605
--HG--
extra : moz-landing-system : lando
Similarly to nsITabParent, TabChild is exposed to frontend code via nsITabChild. It's not clear what the future of this interface will be, but for now we can just rename it to nsIBrowserChild.
Differential Revision: https://phabricator.services.mozilla.com/D28134
--HG--
rename : dom/interfaces/base/nsITabChild.idl => dom/interfaces/base/nsIBrowserChild.idl
extra : rebase_source : a6c42a661e35b19e46c60f6f6a6f3dab64c0a1bc
extra : histedit_source : 1eb475bd840bf37a3f86294685c9b3c250684e79
Most wrapper cached C++ objects are held alive by their wrapper. The
cycle collector takes advantage of this in many classes and ignores
the C++ object if the wrapper is marked black.
However, this is not true for the outer window's wrapper. Instead, the
outer window's wrapper keeps the inner window alive. The inner window
usually keeps its outer window alive, but not after it has been
unlinked. For reasons I do not yet understand, the outer window's
wrapper can be kept alive after the inner window it is a proxy for is
unlinked.
This patch fixes the cycle collector optimization for the outer window
by only applying it if the outer window still has a weak reference to
the inner window, which it will until the inner no longer holds the
outer alive. This in turn fixes, or at least helps fix, window leaks
seen intermittently when the lifetime of outer windows and docshells
are tied together.
The code comment is based on a review comment by peterv.
Differential Revision: https://phabricator.services.mozilla.com/D27981
--HG--
extra : moz-landing-system : lando
It just does wasted work. The new setup is also much more similar to the one
used for element states.
Differential Revision: https://phabricator.services.mozilla.com/D27905
--HG--
extra : moz-landing-system : lando
This is required to support getting the `parent` and `top` properties from
within remote subframes.
Differential Revision: https://phabricator.services.mozilla.com/D26559
--HG--
extra : moz-landing-system : lando