Граф коммитов

8330 Коммитов

Автор SHA1 Сообщение Дата
Benjamin Peterson 9253af4014 Bug 1729843 - Remove vestigial plugin-related code from nsWebNavigationInfo. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D125026
2021-09-09 15:03:05 +00:00
Alexandru Michis 957058da9c Backed out 2 changesets (bug 1729458) for causing leaks in ClientManagerService.
CLOSED TREE

Backed out changeset 42b3a9930fe0 (bug 1729458)
Backed out changeset b8db01010657 (bug 1729458)
2021-09-08 21:32:20 +03:00
Nika Layzell 336e7e2365 Bug 1729458 - Part 2: Make process switches take fewer trips through the event loop, r=smaug
The biggest change in this patch is around the PrepareToChangeRemoteness
promise. It is changed to directly interact with the DOM promise rather than
wrapping it into a MozPromise (which requires another trip through the event
loop), and tries to avoid waiting on the promise at all if it was immediately
resolved (which should always be the case with SHIP enabled, except for in a
single test).

Differential Revision: https://phabricator.services.mozilla.com/D124800
2021-09-08 17:06:16 +00:00
Marian-Vasile Laza 62d525db78 Backed out changeset 9bc536ff95be (bug 1720990) for causing bc failures on browser_bfcache_copycommand.js. CLOSED TREE 2021-09-07 12:52:54 +03:00
Peter Van der Beken 1887defe4a Bug 1720990 - Clear mActiveBrowsingContextInContent when a page goes into the BFCache. r=hsivonen
Differential Revision: https://phabricator.services.mozilla.com/D123941
2021-09-07 08:49:26 +00:00
Florian Quèze 998adb18ea Bug 1728760 - require all nsITimerCallback native implementations to also implement nsINamed, r=smaug.
Differential Revision: https://phabricator.services.mozilla.com/D124349
2021-09-07 08:01:18 +00:00
Nika Layzell 8bd29055b8 Bug 1725572 - Wait for parent ack when discarding BC from child, r=kmag
I am not confident that this will fix the underlying issue causing this crash,
but given how small of a change it is, I figure it's worth trying to land
quickly to see if the crash rate drops with it.

Differential Revision: https://phabricator.services.mozilla.com/D124503
2021-09-03 22:21:49 +00:00
Nika Layzell c525c65ff8 Bug 1722880 - Part 1: Add IsInBFCache to WindowContext, and make it non-SHIP compatible, r=smaug,necko-reviewers,dragana
This field will be useful to JS code such as JSWindowActors which need to be
able to detect when their WindowContext is no longer active.

Differential Revision: https://phabricator.services.mozilla.com/D124098
2021-09-03 15:26:13 +00:00
Mike Conley ab45276a8f Bug 1728375 - Notify session history listeners when entries are being removed via purging or truncation. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D124101
2021-09-02 15:33:16 +00:00
Nika Layzell 4b55141036 Bug 1728605 - Part 3: Rename IsFrame to IsSubframe, r=smaug
This makes the method's name more consistent with IsContentSubframe, and is
probably more clear than IsFrame (as a <browser> could be considered a frame).

Depends on D124211

Differential Revision: https://phabricator.services.mozilla.com/D124212
2021-09-02 14:15:04 +00:00
Nika Layzell b40ab34831 Bug 1728605 - Part 2: Rename misleading {Window,Browsing}Context::IsCached, r=smaug
This method actually tracks whether the context is current, so it has been
renamed, and the behaviour has been inverted.

Depends on D124210

Differential Revision: https://phabricator.services.mozilla.com/D124211
2021-09-02 14:15:04 +00:00
Nika Layzell b123cca8a7 Bug 1728605 - Part 1: Add assertions to various non-SHIP codepaths, r=smaug
These codepaths will never be taken with SHIP enabled, and this patch adds a
couple assertions to keep track of that information for when we rip out SHIP.

Differential Revision: https://phabricator.services.mozilla.com/D124210
2021-09-02 14:15:03 +00:00
Timothy Nikkel 6e65573ea5 Bug 1728665. Use IsRootContentDocumentCrossProcess for a few places dealing with visual scroll offsets. r=botond
Visual scroll offsets can only differ on the cross process root content document.

Differential Revision: https://phabricator.services.mozilla.com/D124257
2021-09-01 23:25:44 +00:00
Olli Pettay 4d366e1861 Bug 1723282, let nonbfcacheable page update layout history state when the new page is coming from the bfcache, r=peterv
The fix let's ContentParent::RecvSynchronizeLayoutHistoryState update the layout history state.

Using an existing test to launch a subtest for this. Hopefully the description of the test helps with reviewing it.
(These BroadcastChannel based tests can be hard to follow.)

Differential Revision: https://phabricator.services.mozilla.com/D122376
2021-08-30 19:50:05 +00:00
Olli Pettay 1c1c20f331 Bug 1670973, add a test to check how http redirects affect to the session history, r=peterv
The old implementation and SHIP seem to have the same behavior.

Differential Revision: https://phabricator.services.mozilla.com/D123117
2021-08-30 19:33:52 +00:00
Henri Sivonen 58e0b2946c Bug 1716290 - Remove protections against the document changing as part of kCharsetFromFinalUserForcedAutoDetection reload. r=emk,emilio
NOTE! In cases where there is no HTTP-layer encoding declaration, and CSS
parsing inherits the encoding from the HTML document, for preloads, this
changes the inherited encoding from windows-1252 to UTF-8 in order to
make the speculative encoding correct in the common `<meta charset=utf-8>`
case.

Differential Revision: https://phabricator.services.mozilla.com/D123593
2021-08-26 18:02:15 +00:00
Nika Layzell c38d0d1762 Bug 1726865 - Prefer using existing content processes for subframes during process selection, r=farre
Differential Revision: https://phabricator.services.mozilla.com/D123661
2021-08-26 16:57:27 +00:00
criss 2be42eea15 Backed out changeset ab805f2926d5 (bug 1716290) for causing failures on link-header-preload.html. CLOSED TREE 2021-08-26 12:07:17 +03:00
Henri Sivonen ff85d45e69 Bug 1716290 - Remove protections against the document changing as part of kCharsetFromFinalUserForcedAutoDetection reload. r=emk
Differential Revision: https://phabricator.services.mozilla.com/D123593
2021-08-26 06:25:31 +00:00
Mark Banner f3ee19dbc7 Bug 1727591 - Enable remaining ESLint rule on remaining docshell/ xhtml files. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D123657
2021-08-25 18:42:19 +00:00
Nika Layzell d47f4a615c Bug 1725572 - Avoid process-switching to a dead process, r=kmag
After some investigation, I was able to find a theoretical codepath
which could lead to the "missing initial frame browsing context" error:

1. Two iframes are created for the same origin, and begin process
   switching.
2. The first iframe finishes process switching, but for some reason
   (e.g. being in shutdown) the call to `LaunchSubprocessResolve`
   errors.
3. The second callback is called and also calls LaunchSubprocessResolve,
   which this time returns `true` due to it previously having been
   called.
4. The BrowserParent is created in the new content process despite
   `InitInternal()` never having been finished, and therefore the
   ContentParent never becoming subscribed to the BrowsingContextGroup.

To fix this, I made 2 changes:

1. Abort from process switching if the target process which we're going
   to be creating a BrowserParent in `IsDead()`, and
2. Track the return value from `LaunchSubprocessResolve`, so we return
   `false` if it is called a second time after a failed content process
   launch.

I'm not confident that this is the cause of the crashes, as I was unable
to reproduce the issue.

Differential Revision: https://phabricator.services.mozilla.com/D123548
2021-08-25 17:54:10 +00:00
Daisuke Akatsuka 0f36be0da7 Bug 1664814: Stop to use regex that identifies string that is uri like. r=adw,Gijs
Differential Revision: https://phabricator.services.mozilla.com/D122818
2021-08-24 10:39:24 +00:00
Daisuke Akatsuka b92a37cc10 Bug 1726305: Avoid throwing NS_ERROR_FAILURE when referring to the host in nsIURI. r=Gijs
Differential Revision: https://phabricator.services.mozilla.com/D123176
2021-08-23 01:58:16 +00:00
Andi-Bogdan Postelnicu 250fa0d795 Bug 1725145 - header files fixes in the hybrid build env. r=valentin
Differential Revision: https://phabricator.services.mozilla.com/D122343
2021-08-22 10:21:55 +00:00
André Bargull d2bbf86876 Bug 1726123 - Part 5: Add missing "js/" includes outside of SM. r=arai
In preparation for the next part, add missing includes to "js/" public headers.

Differential Revision: https://phabricator.services.mozilla.com/D122843
2021-08-17 15:45:39 +00:00
Peter Van der Beken 1d099d0913 Bug 1706347 - Check mOOPChildrenLoading when deciding to put page in BFCache with Fission enabled. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D117199
2021-08-16 09:08:33 +00:00
Mike Conley cc5a65967c Bug 1725489 - Add loadType flags to nsITopLevelNavigationDelegate.shouldNavigate. r=smaug
This will, for example, make it possible to behave differently for a normal navigation,
a reload navigation, a history navigation, and a pushstate navigation.

Differential Revision: https://phabricator.services.mozilla.com/D122532
2021-08-13 13:59:28 +00:00
Cosmin Sabou 87e906e19d Backed out changeset 94d021b67f6f (bug 1716594) for causing Bug 1725458. CLOSED TREE 2021-08-13 13:52:09 +03:00
Sebastian Hengst 536ae6da1a Merge mozilla-central to autoland. CLOSED TREE 2021-08-13 11:38:25 +02:00
Sebastian Hengst 30cca9cb15 Backed out changeset f912045db98d (bug 1706347) for causing content crashes (bug 1725558). a=backout DONTBUILD 2021-08-13 11:19:42 +02:00
Henri Sivonen b0b0f15d1e Bug 1690169 test. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D104801
2021-08-13 08:11:25 +00:00
Olli Pettay 1ce4cb16f5 Bug 1716594, clear the requested index after replacing an entry, r=peterv
Looks like the code below does similar thing already for iframes, so this is adding InternalSetRequestedIndex
call only for the top level case.
This is based on the same assumptions as bug 1697905, but unfortunately testing this is still
super hard.

Differential Revision: https://phabricator.services.mozilla.com/D122355
2021-08-12 14:19:16 +00:00
Peter Van der Beken f78596c95a Bug 1706347 - Check mOOPChildrenLoading when deciding to put page in BFCache with Fission enabled. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D117199
2021-08-12 14:11:29 +00:00
Mike Conley e61c3156c9 Bug 1724748 - Add regression tests for JSWindowActor nsITopLevelNavigationDelegate behaviour. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D122151
2021-08-11 20:17:19 +00:00
Mike Conley 6b8e200b0e Bug 1724748 - Add nsITopLevelNavigationDelegate to allow JSWindowActorChilds to allow/deny top-level navigations. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D122138
2021-08-11 20:17:19 +00:00
Geoff Brown 85539ceb46 Bug 1724423 - Remove test manifest annotations for osx 10.14; r=jmaher,necko-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D122293
2021-08-11 12:11:32 +00:00
Edgar Chen 61b3f2657e Bug 1724905 - Remove native only updateURLAndHistory in nsIDocShell; r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D122211
2021-08-10 22:15:09 +00:00
Nika Layzell e856f2d394 Bug 1650089 - Part 4: Update various tests with new expectations, r=annyG,kmag
The changes in the previous part had a few behaviour changes which are visible
in tests, including cross-origin iframes with sandboxed origins now loading
remotely, and process selection for chrome-triggered null principal loads
behaving differently. In general this caused more process switches.

Differential Revision: https://phabricator.services.mozilla.com/D120674
2021-08-10 14:31:17 +00:00
Nika Layzell aa9b1db7d6 Bug 1650089 - Part 3: Rework DocumentChannel-triggered process switches to support null principals, r=annyG,kmag
This is a large refactoring of the DocumentChannel process switch codepath,
with the end goal of being better able to support future process switch
requirements such as dynamic isolation on android, as well as the immediate
requirement of null principal handling.

The major changes include:
1. The logic is in C++ and has less failure cases, meaning it should be harder
   for us to error out unexpectedly and not process switch.
2. Process selection decisions are more explicit, and tend to rely less on
   state such as the current remoteType when possible. This makes reasoning
   about where a specific load will complete easier.
3. Additional checks are made after a "WebContent" behavior is selected to
   ensure that if an existing document in the same BCG is found, the load will
   finish in the required content process. This should make dynamic checks such
   as Android's logged-in site isolation easier to implement.
4. ProcessIsolation logging is split out from DocumentChannel so that it's
   easier to log just the information related to process selection when
   debugging.
5. Null result principal precursors are considered when performing process
   selection.

Other uses of E10SUtils for process selection have not yet been migrated to the
new design as they have slightly different requirements. This will be done in
follow-up bugs.

Differential Revision: https://phabricator.services.mozilla.com/D120673
2021-08-10 14:31:17 +00:00
Nika Layzell a50cefe2cf Bug 1650089 - Part 1: Add a remoteTypeOverride option for about:blank loads triggered by chrome, r=annyG,kmag
After the changes in this bug, about:blank loads triggered by chrome will
finish in a "web" content process, as they have an untrusted null principal
without a precursor. In a few places throughout the codebase, however, we
perform about:blank loads with the explicit expectation that they do not change
processes. This new remoteTypeOverride option allows the intended final process
to be explicitly specified in this situation.

For security & simplicity reasons, this new attribute is limited to only be
usable on system-principal triggered loads of about:blank in toplevel browsing
contexts.

Differential Revision: https://phabricator.services.mozilla.com/D120671
2021-08-10 14:31:16 +00:00
Olli Pettay 6492d1564b Bug 1721306, hide the tooltip when deactivating a BrowserParent, r=peterv
Differential Revision: https://phabricator.services.mozilla.com/D121756
2021-08-06 19:33:04 +00:00
Olli Pettay e361a4cdfa Bug 1724451, activate the relevant processes when restoring a bfcached page on the foreground tab, r=mccr8
Differential Revision: https://phabricator.services.mozilla.com/D122008
2021-08-06 17:39:21 +00:00
Marian-Vasile Laza 9c94fc9c4c Backed out changeset 37008f131c6f (bug 1721306) for causing bustages on SessionHistoryEntry.cpp. 2021-08-06 19:28:58 +03:00
Olli Pettay ece46d2b64 Bug 1721306, hide the tooltip when deactivating a BrowserParent, r=peterv
Differential Revision: https://phabricator.services.mozilla.com/D121756
2021-08-06 15:13:36 +00:00
Butkovits Atila 22fb2b6793 Backed out 8 changesets (bug 1650089) for causing Xpcshell failures on test_ext_redirects.js. CLOSED TREE
Backed out changeset ee763318d378 (bug 1650089)
Backed out changeset 24d7898ec4bd (bug 1650089)
Backed out changeset bcdd2f5c9840 (bug 1650089)
Backed out changeset 24a5bd7f97dd (bug 1650089)
Backed out changeset 1b8b4e939e82 (bug 1650089)
Backed out changeset a7a4f37a5d72 (bug 1650089)
Backed out changeset 78c012d4b071 (bug 1650089)
Backed out changeset e870508c1ddc (bug 1650089)
2021-08-06 04:35:52 +03:00
Nika Layzell 43b384edf0 Bug 1650089 - Part 4: Update various tests with new expectations, r=annyG,kmag
The changes in the previous part had a few behaviour changes which are visible
in tests, including cross-origin iframes with sandboxed origins now loading
remotely, and process selection for chrome-triggered null principal loads
behaving differently. In general this caused more process switches.

Differential Revision: https://phabricator.services.mozilla.com/D120674
2021-08-06 00:10:57 +00:00
Nika Layzell 58c1037005 Bug 1650089 - Part 3: Rework DocumentChannel-triggered process switches to support null principals, r=annyG,kmag
This is a large refactoring of the DocumentChannel process switch codepath,
with the end goal of being better able to support future process switch
requirements such as dynamic isolation on android, as well as the immediate
requirement of null principal handling.

The major changes include:
1. The logic is in C++ and has less failure cases, meaning it should be harder
   for us to error out unexpectedly and not process switch.
2. Process selection decisions are more explicit, and tend to rely less on
   state such as the current remoteType when possible. This makes reasoning
   about where a specific load will complete easier.
3. Additional checks are made after a "WebContent" behavior is selected to
   ensure that if an existing document in the same BCG is found, the load will
   finish in the required content process. This should make dynamic checks such
   as Android's logged-in site isolation easier to implement.
4. ProcessIsolation logging is split out from DocumentChannel so that it's
   easier to log just the information related to process selection when
   debugging.
5. Null result principal precursors are considered when performing process
   selection.

Other uses of E10SUtils for process selection have not yet been migrated to the
new design as they have slightly different requirements. This will be done in
follow-up bugs.

Differential Revision: https://phabricator.services.mozilla.com/D120673
2021-08-06 00:10:57 +00:00
Nika Layzell 649f35f3a0 Bug 1650089 - Part 1: Add a remoteTypeOverride option for about:blank loads triggered by chrome, r=annyG,kmag
After the changes in this bug, about:blank loads triggered by chrome will
finish in a "web" content process, as they have an untrusted null principal
without a precursor. In a few places throughout the codebase, however, we
perform about:blank loads with the explicit expectation that they do not change
processes. This new remoteTypeOverride option allows the intended final process
to be explicitly specified in this situation.

For security & simplicity reasons, this new attribute is limited to only be
usable on system-principal triggered loads of about:blank in toplevel browsing
contexts.

Differential Revision: https://phabricator.services.mozilla.com/D120671
2021-08-06 00:10:56 +00:00
Anny Gakhokidze 51157f7065 Bug 1704001 - Add a comment explaining HasLoadedNonInitialDocument for BrowsingContext.h, r=nika
Differential Revision: https://phabricator.services.mozilla.com/D121910
2021-08-05 22:54:33 +00:00
Kashav Madan 6f9ccaf7d9 Bug 1722485 - Only flush session storage if we have SessionStore.jsm, r=nika
This is a browser-only module, and loading it for storage flushes causes errors
in GeckoView.

Differential Revision: https://phabricator.services.mozilla.com/D121776
2021-08-05 19:33:04 +00:00