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

8542 Коммитов

Автор SHA1 Сообщение Дата
Evgenia Kotovich e29e29aa5a Bug 1576768 [eslint] Turn on JavaScript linting and formatting rules for .sjs files. r=Standard8
Differential Revision: https://phabricator.services.mozilla.com/D128483
2021-10-22 11:39:46 +00:00
Butkovits Atila 47821a8f76 Backed out 11 changesets (bug 1731982, bug 1736401) for causing crashes in mozilla::dom::ClientHandle::Control. a=backout
Backed out changeset 83176c86784c (bug 1736401)
Backed out changeset 4826707af5b3 (bug 1731982)
Backed out changeset a748e43fada0 (bug 1731982)
Backed out changeset 49302f7705a4 (bug 1731982)
Backed out changeset 59a5860fd74d (bug 1731982)
Backed out changeset 1f7ec5f62c7c (bug 1731982)
Backed out changeset 3142414872de (bug 1731982)
Backed out changeset 363ae2df245d (bug 1731982)
Backed out changeset ae319f8182ac (bug 1731982)
Backed out changeset 23edbfc8e84a (bug 1731982)
Backed out changeset 5f35364352f0 (bug 1731982)
2021-10-19 22:23:12 +03:00
Emilio Cobos Álvarez 4b713033ac Bug 1736141 - Make Document::PreferredColorScheme safe to call off-main-thread. r=mstange
Document::GetBrowsingContext uses a WeakPtr<nsIDocShell> so we can't do
that. But we have all the other media emulation data and so on in the
pres context which we can access off the main thread for style, so move the
override code there.

Differential Revision: https://phabricator.services.mozilla.com/D128673
2021-10-19 09:00:42 +00:00
Tim Huang 2116f04511 Bug 1731982 - Part 3: Use partitioned principal for creating initial client source if needed in nsDocShell. r=asuth
Currently, we are using the regular principal and inherited regular
principal to create clientSource in nsDocShell. This patch makes the
nsDocshell to use the partitioned principal if needed.

Differential Revision: https://phabricator.services.mozilla.com/D127629
2021-10-19 06:33:07 +00:00
Gerald Squelart df50ece611 Bug 1735697 - Remove profiler_can_accept_markers(), use profiler_thread_is_being_profiled() instead - r=florian
Differential Revision: https://phabricator.services.mozilla.com/D128577
2021-10-18 23:11:30 +00:00
Cosmin Sabou 36aa22c7ea Merge autoland to mozilla-central. a=merge 2021-10-19 00:44:04 +03:00
Cosmin Sabou 49f2f21930 Backed out 10 changesets (bug 1731982) for causing OS X performance test failures and crashes (Bug 1736436). a=backout DONTBUILD
Backed out changeset 48e6f591f699 (bug 1731982)
Backed out changeset 77907884b2fa (bug 1731982)
Backed out changeset a299a2d43ebe (bug 1731982)
Backed out changeset 005801e7cf91 (bug 1731982)
Backed out changeset ef71b02c40cc (bug 1731982)
Backed out changeset a52dd02f2b3f (bug 1731982)
Backed out changeset 50b14ef1eb4a (bug 1731982)
Backed out changeset 80641bdceb6a (bug 1731982)
Backed out changeset ada9e2008ca4 (bug 1731982)
Backed out changeset a208016e9953 (bug 1731982)
2021-10-18 22:18:08 +03:00
Sean Feng 3416efe3f7 Bug 1735945 - Split unload into unload and beforeunload for BFCACHE_COMBO telemetry probe r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D128625
2021-10-18 17:31:28 +00:00
Paul Zuehlcke a6a4f92ea0 Bug 1720926 - Rate limit calls to location.reload. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D128636
2021-10-18 17:27:06 +00:00
criss 56b294e821 Backed out changeset 21276955f659 (bug 1720926) for causing hybrid bustages on nsIPrincipal. CLOSED TREE 2021-10-18 16:30:48 +03:00
Tim Huang 737306d9f1 Bug 1731982 - Part 3: Use partitioned principal for creating initial client source if needed in nsDocShell. r=asuth
Currently, we are using the regular principal and inherited regular
principal to create clientSource in nsDocShell. This patch makes the
nsDocshell to use the partitioned principal if needed.

Differential Revision: https://phabricator.services.mozilla.com/D127629
2021-10-18 12:20:32 +00:00
Paul Zuehlcke d73a7968b8 Bug 1720926 - Rate limit calls to location.reload. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D128636
2021-10-18 11:45:44 +00:00
Evgenia Kotovich 0d0980ee0d Bug 1576768 - Automatically format .sjs files using prettier. r=Standard8,agi,zombie,extension-reviewers
# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D128482
2021-10-18 09:26:33 +00:00
Noemi Erli 2bba3cec69 Backed out changeset 2ab6bb03dcc1 (bug 1576768) for causing failures in test_double_submit.html CLOSED TREE 2021-10-18 02:05:57 +03:00
Andreea Pavel e0be794589 Bug 1725277 - disable browser_TopLevelNavigationDelegate.js on linux and win r=intermittent-reviewers,MasterWayZ DONTBUILD
Differential Revision: https://phabricator.services.mozilla.com/D128690
2021-10-17 16:53:06 +00:00
Evgenia Kotovich 3e3dff109c Bug 1576768 - Automatically format .sjs files using prettier. r=Standard8,agi,zombie,extension-reviewers
# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D128482
2021-10-17 14:59:14 +00:00
Cristian Tuns dd44cdf4ef Backed out 10 changesets (bug 1731982) for causing hybrid bustages on nsCORSListenerProxy.obj CLOSED TREE
Backed out changeset a248413c22ec (bug 1731982)
Backed out changeset 1bd7de5d93a1 (bug 1731982)
Backed out changeset d028e1ce1313 (bug 1731982)
Backed out changeset 7db7537bbc24 (bug 1731982)
Backed out changeset 28c18d83906d (bug 1731982)
Backed out changeset 6258b4e10406 (bug 1731982)
Backed out changeset 68bf86b1459c (bug 1731982)
Backed out changeset b8990af2fca2 (bug 1731982)
Backed out changeset 153783261021 (bug 1731982)
Backed out changeset bc9c3abbb8f8 (bug 1731982)
2021-10-15 18:12:21 -04:00
Tim Huang 491d40776f Bug 1731982 - Part 3: Use partitioned principal for creating initial client source if needed in nsDocShell. r=asuth
Currently, we are using the regular principal and inherited regular
principal to create clientSource in nsDocShell. This patch makes the
nsDocshell to use the partitioned principal if needed.

Differential Revision: https://phabricator.services.mozilla.com/D127629
2021-10-15 20:00:02 +00:00
Alexandru Michis dac6815201 Backed out changeset 7c08aa027893 (bug 1576768) for causing multiple failures.
CLOSED TREE
2021-10-15 16:52:43 +03:00
Evgenia Kotovich a8b32926fa Bug 1576768 - Automatically format .sjs files using prettier. r=Standard8,agi,zombie,extension-reviewers
# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D128482
2021-10-15 12:58:11 +00:00
Christoph Kerschbaumer 3c0563c316 Bug 1732637: Update tests within docshell/ to work with https-first enabled r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D128373
2021-10-13 14:52:18 +00:00
Olli Pettay 78a73d7f93 Bug 1733067 - Update SHEntrySharedParentState::mExpired when loading a page, r=peterv
The main part of the patch is to get the state to
CanonicalBrowsingContext::SessionHistoryCommit.
The old code does similar thing in
https://searchfox.org/mozilla-central/rev/d37daf2f82ed22b6a2a5cbbb975423825dfd69fa/docshell/base/nsDocShell.cpp#11630-11638

This is not fixing the issue with session store where the flag is lost.
Also, I think SessionHistoryEntry should probably store a timestamp and not just a flag, but that
would change the behavior more vs. the old implementation.

Differential Revision: https://phabricator.services.mozilla.com/D128313
2021-10-13 14:42:56 +00:00
Cristian Tuns d3df74e295 Backed out 9 changesets (bug 1731982) for causing wpt failures on localStorage. CLOSED TREE
Backed out changeset bbeba8b14a2f (bug 1731982)
Backed out changeset 645cc214c608 (bug 1731982)
Backed out changeset 3a8e2f9c15e8 (bug 1731982)
Backed out changeset 208dd7c57311 (bug 1731982)
Backed out changeset 76a13a728f13 (bug 1731982)
Backed out changeset a6bfce877a86 (bug 1731982)
Backed out changeset 5fc4e33a8232 (bug 1731982)
Backed out changeset 353e3b3e020a (bug 1731982)
Backed out changeset b07167090923 (bug 1731982)
2021-10-13 10:47:25 -04:00
Tim Huang a2a5b1944c Bug 1731982 - Part 3: Use partitioned principal for creating initial client source if needed in nsDocShell. r=asuth
Currently, we are using the regular principal and inherited regular
principal to create clientSource in nsDocShell. This patch makes the
nsDocshell to use the partitioned principal if needed.

Differential Revision: https://phabricator.services.mozilla.com/D127629
2021-10-13 11:18:53 +00:00
Noemi Erli cb0b4097d6 Backed out 9 changesets (bug 1731982) for causing Bp-hybrid bustages CLOSED TREE
Backed out changeset 82bb76c2e531 (bug 1731982)
Backed out changeset 8240ef0e1771 (bug 1731982)
Backed out changeset f46f05792c6a (bug 1731982)
Backed out changeset 449c821bc56e (bug 1731982)
Backed out changeset cb813505b5a9 (bug 1731982)
Backed out changeset 06fad8cd9345 (bug 1731982)
Backed out changeset 4b8cf4756686 (bug 1731982)
Backed out changeset 5468bf77f732 (bug 1731982)
Backed out changeset 7800585e3d6a (bug 1731982)
2021-10-12 23:12:19 +03:00
Tim Huang 7075341260 Bug 1731982 - Part 3: Use partitioned principal for creating initial client source if needed in nsDocShell. r=asuth
Currently, we are using the regular principal and inherited regular
principal to create clientSource in nsDocShell. This patch makes the
nsDocshell to use the partitioned principal if needed.

Differential Revision: https://phabricator.services.mozilla.com/D127629
2021-10-12 18:55:19 +00:00
Olli Pettay 9eb90441a7 Bug 1734858, use the real index when updating the index after a bfcache load, r=peterv
The issue is that when going back from a non-bfcacheable page to a bfcacheable page and the first page
modifies requested index around the same time, UpdateIndex() doesn't have the right requested index. This is a variant of bug 1725680.
The test case loads a non-bfcacheable page, then bfcachable, then another non-bfcacheable and then goes back and forward.
Without the patch indexes go wrong and forward doesn't do anything.

Differential Revision: https://phabricator.services.mozilla.com/D127963
2021-10-12 11:23:17 +00:00
Emilio Cobos Álvarez 37660aa996 Bug 1730503 - Make anonymous scrollbar caching work on mac by default, and unify scrollbars.css across platforms. r=mstange,desktop-theme-reviewers,dao
We make it work on macOS by setting pointer-events: none + opacity: 0 rather
than visibility: hidden, and tweaking the caching setup to be Android-like.

Now that the scrollbars sheet is the same across platforms, move it to where
the rest of the UA sheets are. This way we guarantee that the RDM vs. Android
difference is less (just the ifdef at the top of the sheet).

Depends on D128084

Differential Revision: https://phabricator.services.mozilla.com/D128085
2021-10-12 09:21:18 +00:00
Emilio Cobos Álvarez 4f8856c545 Bug 1730503 - Make RDM force Android-style scrollbars better. r=mstange,devtools-backward-compat-reviewers,nchevobbe
There are a few bits that still don't work with this patch but will with the
following patches.

Differential Revision: https://phabricator.services.mozilla.com/D128083
2021-10-12 09:21:17 +00:00
Karl Tomlinson e91d1ff3ec Bug 1732410 wait for focus before proceeding for enumerateDevices() Promises r=jib,nika
https://github.com/w3c/mediacapture-main/pull/574

Focus on browser chrome widgets is accepted provided the tab is fully active
and foreground.
https://github.com/w3c/mediacapture-main/issues/752#issuecomment-742036800

Differential Revision: https://phabricator.services.mozilla.com/D127051
2021-10-11 20:44:39 +00:00
Johann Hofmann 479107443c Bug 1644914 - Give out user interactions to session history entries when system principal initiates a load. r=smaug
This is a pretty cheap way of fixing this bug by saying nsDocShell::loadURI calls
done with a system principal will add user interaction to the current page. This takes
advantage of the fact that all UI code for loading URIs goes through this code path.

Note that during debugging I've found other cases where SH entries would be added with
a system principal, most notably when navigating to URL hashes/fragments (example.com#hash).
I'm not sure why this is happening but it doesn't go through nsDocShell::loadURI.

Differential Revision: https://phabricator.services.mozilla.com/D127558
2021-10-11 16:51:01 +00:00
Tomislav Jovanovic 1b801a123d Bug 1708243 - Part 4: Remove tab-content.js and onExtensionBrowser.js, stop touching .content eagerly r=robwu
Differential Revision: https://phabricator.services.mozilla.com/D127750
2021-10-09 22:45:28 +00:00
Nika Layzell 951525ada7 Bug 1732911 - Hold a PendingDiscard during BrowsingContext::Detach in parent, r=kmag
Differential Revision: https://phabricator.services.mozilla.com/D127483
2021-10-04 21:04:05 +00:00
Peter Van der Beken 0cb68caed4 Bug 1729662 - UNED exam page flickers / reloads infinitely. r=smaug
When we navigate in history to the same entry that we're current at then we
actually do a reload. The problem is in the way we detect whether to do a reload
in the parent process.

If a page does a back and a forward one after the other in a script, then the
parent will calculate the index for the back and tell the child to load the
entry at that index. While the child is processing the load of that entry, the
BC in the parent process still has the same entry as its active entry (until the
child commits the load of the entry over IPC). The parent then processes the
forward, calculates the index for the forward and finds the entry at that index.
This is the same entry that we were at before doing anything, and so the same
entry as the active entry in the BC in the parent process. We used to compare
the entry that we're going to load with the active entry in the BC to determine
whether we're doing a reload, and so in this situation we would assume the
forward navigation was actually doing a reload. The child would reload the page,
and we'd run the script again and we'd end up in a reload loop.

Comparing the offset with 0 to determine whether we're doing a reload fixes this
issue.

Differential Revision: https://phabricator.services.mozilla.com/D126585
2021-10-04 15:01:30 +00:00
Edgar Chen 1e75e43ecc Bug 1733052 - Part 2: Revise popup abuse level if there is a valid transient user activation; r=smaug
This is a intermediate solution to make popup block could work with new user
activation model (timer base). I think this should cover most of async case for
`window.open()`. For long term, we still need to clean up the popup state which
is tracked by bug 1656444.

Differential Revision: https://phabricator.services.mozilla.com/D126879
2021-10-04 09:17:18 +00:00
Alexandru Michis bb8b740837 Backed out changeset d25df1c9e0e2 (bug 1729662) for causing wpt failures in overlapping-navigations-and-traversals
CLOSED TREE
2021-09-30 14:31:50 +03:00
Peter Van der Beken a57818d127 Bug 1729662 - UNED exam page flickers / reloads infinitely. r=smaug
When we navigate in history to the same entry that we're current at then we
actually do a reload. The problem is in the way we detect whether to do a reload
in the parent process.

If a page does a back and a forward one after the other in a script, then the
parent will calculate the index for the back and tell the child to load the
entry at that index. While the child is processing the load of that entry, the
BC in the parent process still has the same entry as its active entry (until the
child commits the load of the entry over IPC). The parent then processes the
forward, calculates the index for the forward and finds the entry at that index.
This is the same entry that we were at before doing anything, and so the same
entry as the active entry in the BC in the parent process. We used to compare
the entry that we're going to load with the active entry in the BC to determine
whether we're doing a reload, and so in this situation we would assume the
forward navigation was actually doing a reload. The child would reload the page,
and we'd run the script again and we'd end up in a reload loop.

Comparing the offset with 0 to determine whether we're doing a reload fixes this
issue.

Differential Revision: https://phabricator.services.mozilla.com/D126585
2021-09-30 07:56:52 +00:00
Nika Layzell 33a743b9b9 Bug 1731792 - Don't switch processes for BFCached same-origin navigations, r=smaug
This is a much simplified patch compared to the earlier changes, and
aims to be less risky and avoid whatever issues are being caused by the
process selection changes in the earlier patches. Unfortunately, I think
this patch may reduce the ability for a noopener window to be given a
distinct process, so I would prefer a more complete fix in the future.

This new patch also no longer has a fix for bug 1728331, so that will
need to be fixed separately.

Differential Revision: https://phabricator.services.mozilla.com/D126951
2021-09-29 19:53:01 +00:00
Olli Pettay 0ca720d7a3 Bug 1725680, requested index should be used only by the nsSHistory (and related code in CanonicalBrowsingContext), r=peterv
Using requestedIndex on the child side is hard, because there are race conditions when a session history load is triggered
and at the same time a non-session history load commits a new active entry.

Differential Revision: https://phabricator.services.mozilla.com/D126619
2021-09-29 13:22:34 +00:00
Olli Pettay 524e95c9e4 Bug 1732250, use the original URI from the old channel when updating session history entry, r=peterv,necko-reviewers,valentin
https://searchfox.org/mozilla-central/rev/1df999af9999ccb436512cfece57a68d94d36e08/netwerk/protocol/http/nsHttpChannel.cpp#2876
makes original uri handling in the channel rather magical. The value of it on the new channel is bogus during
AsyncOnChannelRedirect call, and nsIChannel.idl doesn't hint about that behavior.

browser_getNavigationHistory.js can work as a testcase once it is enabled for Fission.

Differential Revision: https://phabricator.services.mozilla.com/D126735
2021-09-29 09:35:59 +00:00
Iulian Moraru 1bffda0bc3 Backed out changeset a399e91dd5c2 (bug 1729662) for causing wpt failures on cross-document-traversal-cross-document-traversal.html. 2021-09-28 19:14:02 +03:00
Peter Van der Beken ef6256101a Bug 1729662 - UNED exam page flickers / reloads infinitely. r=smaug
When we navigate in history to the same entry that we're current at then we
actually do a reload. The problem is in the way we detect whether to do a reload
in the parent process.

If a page does a back and a forward one after the other in a script, then the
parent will calculate the index for the back and tell the child to load the
entry at that index. While the child is processing the load of that entry, the
BC in the parent process still has the same entry as its active entry (until the
child commits the load of the entry over IPC). The parent then processes the
forward, calculates the index for the forward and finds the entry at that index.
This is the same entry that we were at before doing anything, and so the same
entry as the active entry in the BC in the parent process. We used to compare
the entry that we're going to load with the active entry in the BC to determine
whether we're doing a reload, and so in this situation we would assume the
forward navigation was actually doing a reload. The child would reload the page,
and we'd run the script again and we'd end up in a reload loop.

Comparing the offset with 0 to determine whether we're doing a reload fixes this
issue.

Differential Revision: https://phabricator.services.mozilla.com/D126585
2021-09-28 13:25:15 +00:00
criss 9d7155125b Backed out 2 changesets (bug 1731792) for causing devtools failures on browser_console_error_source_click.js
Backed out changeset 567d4eb7bc83 (bug 1731792)
Backed out changeset db57b8568ae9 (bug 1731792)
2021-09-28 06:15:28 +03:00
Nika Layzell 2793bb97a7 Bug 1731792 - Part 1: Avoid cycling between processes when navigating within a tab, r=smaug
This patch replaces the previous process selection infrastructure with a
new setup implemented entirely in C++, which should more accurately
track the set of processes in use, and should encourage re-use of the
existing content process when navigating by not counting the current
tab.

This approach intentionally allows for process switching to another
process during navigation if there is uneven load between processes to
encourage balanced process use.

I think this may also fix some of the session restore issues with many
tabs using the same process, rather than being spread over 4, as we now
track a tab earlier in its lifecycle before the BrowserParent instance
is created.

Differential Revision: https://phabricator.services.mozilla.com/D126405
2021-09-27 22:34:20 +00:00
Butkovits Atila 24d8b4f45f Backed out 2 changesets (bug 1731792) for causing mochitest failures.
Backed out changeset 44c28a29bbd8 (bug 1731792)
Backed out changeset 51bdb1d4baab (bug 1731792)
2021-09-27 18:54:29 +03:00
Nika Layzell e1a2352d73 Bug 1731792 - Part 1: Avoid cycling between processes when navigating within a tab, r=smaug
This patch replaces the previous process selection infrastructure with a
new setup implemented entirely in C++, which should more accurately
track the set of processes in use, and should encourage re-use of the
existing content process when navigating by not counting the current
tab.

This approach intentionally allows for process switching to another
process during navigation if there is uneven load between processes to
encourage balanced process use.

I think this may also fix some of the session restore issues with many
tabs using the same process, rather than being spread over 4, as we now
track a tab earlier in its lifecycle before the BrowserParent instance
is created.

Differential Revision: https://phabricator.services.mozilla.com/D126405
2021-09-27 13:49:32 +00:00
Nika Layzell 66064a20e9 Bug 1725572 - Part 2: Keep BrowsingContext alive until every process has acknowledged the discard, r=farre
Differential Revision: https://phabricator.services.mozilla.com/D125897
2021-09-23 18:54:31 +00:00
owlishDeveloper 800e6ffa5d Bug 1697866 - Add HTTPS-only specific error code and pass it to GeckoView, to handle HTTPS-only specific errors correctly r=agi,JulianWels,nika,ckerschb
Differential Revision: https://phabricator.services.mozilla.com/D120914
2021-09-23 01:41:47 +00:00
Noemi Erli 50d4e6c878 Backed out changeset 890d147bad1d (bug 1697866) for causing bustages in WindowGlobalParent.cpp CLOSED TREE 2021-09-23 01:20:43 +03:00
owlishDeveloper 7acebc65af Bug 1697866 - Add HTTPS-only specific error code and pass it to GeckoView, to handle HTTPS-only specific errors correctly r=agi,JulianWels,nika,ckerschb
Differential Revision: https://phabricator.services.mozilla.com/D120914
2021-09-22 18:30:39 +00:00
Olli Pettay f083f381d8 Bug 1727514 - media playback should stop in the bfcache, r=peterv
This version doesn't change SetContainer handling, since it seems to be tricky for the top level page.
So only activity change notification is fired and IsActive() is updated.
The comment about IsActive() was wrong even with the old bfcache implementation.
(I did check that it returned false when the page was in bfcache and many of the activity observers rely on that)

The changes to HTMLMediaElement are needed to ensure page can enter bfcache..

Differential Revision: https://phabricator.services.mozilla.com/D124684
2021-09-20 08:49:22 +00:00
Olli Pettay b9336991af Bug 1730977 - Check the existence of requests before calling Stop(), r=peterv
Differential Revision: https://phabricator.services.mozilla.com/D125752
2021-09-17 14:18:20 +00:00
Sandor Molnar 7398f479b5 Merge autoland to mozilla-central. a=merge 2021-09-16 18:58:41 +03:00
Sandor Molnar c60bc752d8 Backed out changeset 2d49d73f38aa (bug 1727514) for causing frequent crashes. a=backout 2021-09-16 15:52:56 +03:00
Valentin Gosu 72c414923b Bug 1730494 - Add error codes for COOP and COEP errors r=necko-reviewers,dragana
Differential Revision: https://phabricator.services.mozilla.com/D125671
2021-09-16 08:31:04 +00:00
Nika Layzell 0c06ba67db 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-14 15:02:58 +00:00
Sandor Molnar 5f8d191513 Backed out 3 changesets (bug 1729458) for causing multiple dt failures. CLOSED TREE
Backed out changeset 16b385e15fad (bug 1729458)
Backed out changeset 72b7a9c7bf30 (bug 1729458)
Backed out changeset 704dd03288b1 (bug 1729458)
2021-09-13 21:08:44 +03:00
Peter Van der Beken 24ff2ec352 Bug 1720990 - Clear mActiveBrowsingContextInContent when a page goes into the BFCache. r=hsivonen
Differential Revision: https://phabricator.services.mozilla.com/D123941
2021-09-13 16:57:15 +00:00
Nika Layzell edec406a72 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-13 15:23:32 +00:00
Olli Pettay d0485c8a55 Bug 1727514 - media playback should stop in the bfcache, r=peterv
SetContainer handling is similar to what DocumentViewer does for the old bfcache implementation.
(The old implementation hides it quite well).
The changes to HTMLMediaElement are needed to ensure page can enter bfcache.

Removed erroneous MOZ_ASSERT in nsPresContext, it is ok to trigger that code path in the new implementation.
And the Run() method of the relevant nsIRunnable already deals with that case.

Differential Revision: https://phabricator.services.mozilla.com/D124684
2021-09-13 12:40:18 +00:00
Peter Van der Beken 42d3aca4dc Bug 1728413 - mistik.xtr.jp doesn't load. r=smaug
Getting all the requests from the loadgroup every time a request
is added or removed was causing performance issues. It turns out
that it wasn't really needed for determining if a page should be
blocked from the BFCache, since we just need to know if there
are any requests in the loadgroup, and if so, if all it contains
is just one request with an id. We can keep a count of relevant
requests in the loadgroup. When the count changes to 1, on adding
we can inspect the request that's being added, and on removal we
can inspect the requests in the loadgroup (which should be now be
cheap enough, since there's only 1 relevant request in the list).

Differential Revision: https://phabricator.services.mozilla.com/D125251
2021-09-13 12:35:31 +00:00
Michelle Goossens d835eb1793 Bug 1727925 - Part 3: Migrate six more windows10-32 test suites from AWS to Azure r=jmaher
Differential Revision: https://phabricator.services.mozilla.com/D124192
2021-09-10 11:51:00 +00:00
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
Alexandru Michis 4b49a0dc50 Merge autoland to mozilla-central. a=merge 2021-08-04 12:35:44 +03:00
Alexandru Michis 5ca72bfc53 Backed out 7 changesets (bug 1650089) for causing xpcshell failures in test_ext_cookieBehaviors.js
Backed out changeset 336d6eb2fc15 (bug 1650089)
Backed out changeset 283ba29cdbeb (bug 1650089)
Backed out changeset c470e4c65117 (bug 1650089)
Backed out changeset 8fc2f428694d (bug 1650089)
Backed out changeset 37e5185dae14 (bug 1650089)
Backed out changeset a26afdc56d91 (bug 1650089)
Backed out changeset 32e207558b3d (bug 1650089)
2021-08-04 12:32:07 +03:00
alwu 1c18fb5f4d Bug 1719183 - part1 : use a count to generalize the usage of preventing page from being suspended. r=nika
To support more cases, change this value to more general name and use a count instead, if the count is larger than zero, then we would not suspend the page.

In addition, this value now can be set in any processes (but still for the top level only), which is different from before where we would only set the value from the chrome process.

Differential Revision: https://phabricator.services.mozilla.com/D119837
2021-08-03 21:32:26 +00:00
Nika Layzell 424c2aeb15 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-03 18:17:55 +00:00
Nika Layzell e0fc657cb6 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-03 18:17:54 +00:00
Nika Layzell 3d749ece7f 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-03 18:17:54 +00:00
Noemi Erli 6cd9318b66 Backed out 7 changesets (bug 1650089) foe causing bustages in ProcessIsolation.cpp
Backed out changeset 4e73beb8872c (bug 1650089)
Backed out changeset 092451e931ce (bug 1650089)
Backed out changeset ca9ba60010c6 (bug 1650089)
Backed out changeset ee61b69ba556 (bug 1650089)
Backed out changeset 091c4efa36a7 (bug 1650089)
Backed out changeset dbdee40ef8a0 (bug 1650089)
Backed out changeset 54d12a4333a0 (bug 1650089)
2021-08-03 20:15:54 +03:00
Nika Layzell 58889881ec 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-03 15:39:34 +00:00
Nika Layzell 35dca5bd20 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-03 15:39:34 +00:00
Nika Layzell 78129583eb 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-03 15:39:33 +00:00
Christoph Kerschbaumer 7b1de5e29d Bug 1722978: Update tests within docshell/ to work with https-first enabled r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D121233
2021-08-02 06:43:27 +00:00
Kashav Madan f090aabc96 Bug 1718761 - Move {Start,Stop}ApzAutoscroll to CanonicalBrowsingContext, r=Gijs,hiro
This accomplishes 2 things:

1. Allows us to directly fetch the layersId of the process that is
   autoscrolling, which avoids having to fetch it in AutoScrollChild and pass it
   around. This fixes autoscrolling out-of-process frames with Fission enabled.
2. Makes it easier to handle autoscrolling of in-process documents, since that
   can't happen through PBrowser.

Differential Revision: https://phabricator.services.mozilla.com/D120766
2021-07-31 01:39:09 +00:00
Sandor Molnar ca94997814 Backed out changeset 4593c3d66951 (bug 1718761) for causing clang build bustages. CLOSED TREE 2021-07-31 03:44:56 +03:00
Kashav Madan c84c4eb9d7 Bug 1718761 - Move {Start,Stop}ApzAutoscroll to CanonicalBrowsingContext, r=Gijs,hiro
This accomplishes 2 things:

1. Allows us to directly fetch the layersId of the process that is
   autoscrolling, which avoids having to fetch it in AutoScrollChild and pass it
   around. This fixes autoscrolling out-of-process frames with Fission enabled.
2. Makes it easier to handle autoscrolling of in-process documents, since that
   can't happen through PBrowser.

Differential Revision: https://phabricator.services.mozilla.com/D120766
2021-07-30 23:39:32 +00:00
Dorel Luca f8c23e7e7f Backed out 5 changesets (bug 1650089) for Browser-chrome failures in browser/components/originattributes/test/browser/browser_firstPartyIsolation_aboutPages.js. CLOSED TREE
Backed out changeset 26ddad079ad3 (bug 1650089)
Backed out changeset 5ae2b2641484 (bug 1650089)
Backed out changeset c5d267a1907c (bug 1650089)
Backed out changeset d9eeca699dec (bug 1650089)
Backed out changeset 8bb303f6831a (bug 1650089)
2021-07-29 05:53:31 +03:00
Ted Campbell e47122deae Bug 1722803 - Always initialize TimelineConsumers at startup. r=nika
Instead of initializing on first use - which can race with workers - do the
initialization in nsLayoutStatics::Initialize(). Also make `sInShutdown` an
Atomic since it is accessed without locks.

Differential Revision: https://phabricator.services.mozilla.com/D121143
2021-07-29 01:53:31 +00:00
Nika Layzell 2dabc0ed14 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-07-29 01:40:20 +00:00
Nika Layzell 3072efd270 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-07-29 01:40:20 +00:00
Nika Layzell d1a6052ca7 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-07-29 01:40:19 +00:00
Christoph Kerschbaumer 4a6250387f Bug 1719272: Annotate failing browser/ tests to potentially enable https-first mode in Nightly r=webcompat-reviewers,denschub,webdriver-reviewers,preferences-reviewers,Gijs,whimboo
Differential Revision: https://phabricator.services.mozilla.com/D119177
2021-07-28 19:16:16 +00:00
Sandor Molnar 68cdec0548 Backed out changeset 7eb8945dd8e3 (bug 1719272) for causing bustages in gecko decision task. CLOSED TREE 2021-07-28 19:47:06 +03:00
Christoph Kerschbaumer bb716f0701 Bug 1719272: Annotate failing browser/ tests to potentially enable https-first mode in Nightly r=webcompat-reviewers,denschub,webdriver-reviewers,preferences-reviewers,Gijs,whimboo
Differential Revision: https://phabricator.services.mozilla.com/D119177
2021-07-28 16:08:07 +00:00
Hiroyuki Ikezoe a5ecf77776 Bug 1695806 - Defer sending a snapshot reqeust for remote process iframe until cloning the iframe document finished. r=mattwoodrow,nika
Differential Revision: https://phabricator.services.mozilla.com/D119950
2021-07-27 00:47:44 +00:00
Kris Maglione 3ee95f8b32 Bug 1716849: Add crash annotation for error when aborting for failed module import. r=mccr8
There are a number of modules that we import from C++ and can't continue
running without. We have a number of crashes for some of those failed loads. A
lot of them are from OOMs or corruption, but we're not sure about the rest.

This patch adds a crash annotation with the details of the error wherever we
abort for failing to load a module.

Differential Revision: https://phabricator.services.mozilla.com/D120290
2021-07-22 16:58:02 +00:00
Butkovits Atila f1369e39ea Backed out changeset ef812b3d914d (bug 1716849) for causing assertion failures at nsImportModule.cpp. CLOSED TREE 2021-07-22 06:49:23 +03:00
Kris Maglione f69238e72d Bug 1716849: Add crash annotation for error when aborting for failed module import. r=mccr8
There are a number of modules that we import from C++ and can't continue
running without. We have a number of crashes for some of those failed loads. A
lot of them are from OOMs or corruption, but we're not sure about the rest.

This patch adds a crash annotation with the details of the error wherever we
abort for failing to load a module.

Differential Revision: https://phabricator.services.mozilla.com/D120290
2021-07-22 01:28:22 +00:00
Manuel Bucher 3918a58a02 Bug 1721459 - Remove nsIDeprecationWarner r=necko-reviewers,kershaw
Differential Revision: https://phabricator.services.mozilla.com/D120474
2021-07-21 15:19:15 +00:00
Emilio Cobos Álvarez a5e65da4cb Bug 1714614 - Send visited query results only to interested processes. r=mak,geckoview-reviewers,agi
Differential Revision: https://phabricator.services.mozilla.com/D117179
2021-07-21 12:23:33 +00:00
Csoregi Natalia 1b9596a92c Backed out changeset b6399ca8a2c1 (bug 1706347) for failures on iframe-cross-origin-print.sub.html. CLOSED TREE 2021-07-20 00:41:23 +03:00
Peter Van der Beken 276952b05e 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-07-19 19:18:02 +00:00
Alexandre Poirot 18df9f0064 Bug 1721203 - Fix WebProgress STATE_START+DOCUMENT+WINDOW for bfcache navigations. r=smaug
Ensure firing the onStateChange on the BrowsingContext's WebProgress
of the page we navigate *from* instead of the one we navigate *to*.
(which was what used to happen before fission/bfcacheInParent)

Differential Revision: https://phabricator.services.mozilla.com/D119648
2021-07-19 16:16:06 +00:00
Alexandre Poirot a4ab941009 Bug 1720304 - Implement WebProgress.browsingContext r=nika
This helps knowing which particular BrowsingContext is navigating.

Differential Revision: https://phabricator.services.mozilla.com/D119647
2021-07-19 08:28:19 +00:00
Olli Pettay 179938a106 Bug 1720733 - Try to ensure SessionHistoryEntry::mFrameLoader isn't replaced accidentally, r=peterv
I don't have a test for this, since the race condition is super hard to trigger.
The patch is based on code auditing.

The patch just prevents bfcaching if we're in middle of another load.

Differential Revision: https://phabricator.services.mozilla.com/D119992
2021-07-17 09:34:46 +00:00
Cosmin Sabou 069663f683 Bug 1710069 - Fix syntax to unbust decision task. a=bustage-fix 2021-07-16 03:14:05 +03:00
Geoff Lankow e99bcfe163 Bug 1710069 - Disable test_subframe_stop_after_parent_error.js on Thunderbird until after 91. r=nika
This test can't pass with browser.tabs.remote.autostart=true, and it cannot be false in Thunderbird tests.

Differential Revision: https://phabricator.services.mozilla.com/D119477
2021-07-15 23:42:01 +00:00
Florian Quèze ca7bbcc752 Bug 1720374 - Remove MOZ_GECKO_PROFILER ifdefs that are not useful, r=gerald.
Differential Revision: https://phabricator.services.mozilla.com/D119810
2021-07-15 22:04:23 +00:00
Nika Layzell 4f50b5b81a Bug 1586830 - Part 3: Add a test for isInitialDocument, r=smaug
This test is based on the test written by ochameau for
https://phabricator.services.mozilla.com/D118740, but with modifications
to specifically test `isInitialDocument`.

Differential Revision: https://phabricator.services.mozilla.com/D119817
2021-07-14 15:51:20 +00:00
Nika Layzell fdaf413fa3 Bug 1586830 - Part 1: Ensure IsInitialDocument is set earlier and consistently on WindowGlobalParent, r=smaug
This makes sure to clear and set the value more consistently when replacing
documents within a WindowGlobal, and makes sure to include the relevant flag in
the initializer.

In addition, the place where the flag is set is moved ahead to happen before
the call to `Embed` so that the information is ready before the window is
created.

Differential Revision: https://phabricator.services.mozilla.com/D119815
2021-07-14 15:51:20 +00:00
Matt Woodrow 677adecb5d Bug 1719449 - Store fragment URL after we're sure we've scrolled. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D119582
2021-07-13 22:11:24 +00:00
Nika Layzell e89956fbff Bug 1719184 - Transmit blob URLs more accurately when loading, r=asuth
Differential Revision: https://phabricator.services.mozilla.com/D119539
2021-07-12 20:56:04 +00:00
Anny Gakhokidze 1620a4511a Bug 1646532 - Move mAreDialogsEnabled, mLastDialogQuitTime and mDialogAbuseCount to BC group, r=nika
Differential Revision: https://phabricator.services.mozilla.com/D119299
2021-07-12 17:53:53 +00:00
Gijs Kruitbosch 8c639aaff3 Bug 1719442 - stop doing alternate fixup for 'http' or 'https' strings as host names, r=mak
Differential Revision: https://phabricator.services.mozilla.com/D119391
2021-07-09 12:49:54 +00:00
Olli Pettay f2c39ef580 Bug 1719178 - properly disconnect nsSHistory from the owner object, r=peterv
Differential Revision: https://phabricator.services.mozilla.com/D119114
2021-07-08 11:08:19 +00:00
Olli Pettay d35325594f Bug 1717765, tweak the check when creating a new content viewer shouldn't succeed, r=peterv
The patch is based on the assumption that the assertion fails because of
https://searchfox.org/mozilla-central/rev/1c5c3f4ec274462b92cf5bd82235ae3a56c508e9/dom/base/nsGlobalWindowInner.cpp#2775

Differential Revision: https://phabricator.services.mozilla.com/D119233
2021-07-07 16:55:23 +00:00
Edgar Chen 47e66cd7d9 Bug 1716762 - Don't allow focus to move to remote iframe which is display: none; r=emilio
Make it behave the same as in-process iframe.

Differential Revision: https://phabricator.services.mozilla.com/D118002
2021-07-07 12:08:18 +00:00
Matt Woodrow 3af88f56b7 Bug 1617469 - Wait for the scroll position to change in bug298622 test. r=smaug DONTBUILD
Differential Revision: https://phabricator.services.mozilla.com/D119142
2021-07-06 22:37:55 +00:00
Emilio Cobos Álvarez a5f4c42f89 Bug 1717983 - Improve PresShell active flag handling. r=nika
This moves the logic of whether a pres shell should be active to a
single place to make it sane to reason about, and fixes the
subdocument propagation when a BrowserChild becomes visible.

Differential Revision: https://phabricator.services.mozilla.com/D118703
2021-07-05 17:31:48 +00:00
Andreas Farre d9f3a1519c Bug 1701303 - Move counting of private browsing contexts to parent process. r=smaug,johannh
Move the counting of private browsing contexts to the parent
process. Also change to only consider non-chrome browsing contexts
when counting private contexts. The latter is possible due to bug
1528115, because we no longer need to support hidden private windows.

With counting in the parent process we can make sure that when we're
changing remoteness on a private browsing context the private browsing
context count never drops to zero. This fixes an issue with Fission,
where we remoteness changes could transiently have a zero private
browsing context count, that would be mistaken for the last private
browsing context going away.

Changing to only count non-chrome browsing contexts makes us only fire
'last-pb-context-exited' once, and since we count them in the parent
there is no missing information about contexts that makes us wait for
a content process about telling us about insertion or removal of
browsing contexts.

Differential Revision: https://phabricator.services.mozilla.com/D118182
2021-07-05 15:17:55 +00:00
Marian-Vasile Laza 17d6e262f7 Backed out changeset 55f827545de2 (bug 1701303) for causing bustages on ContentParent.cpp. CLOSED TREE 2021-07-05 17:12:13 +03:00
Andreas Farre b3cd1ccf21 Bug 1701303 - Move counting of private browsing contexts to parent process. r=smaug,johannh
Move the counting of private browsing contexts to the parent
process. Also change to only consider non-chrome browsing contexts
when counting private contexts. The latter is possible due to bug
1528115, because we no longer need to support hidden private windows.

With counting in the parent process we can make sure that when we're
changing remoteness on a private browsing context the private browsing
context count never drops to zero. This fixes an issue with Fission,
where we remoteness changes could transiently have a zero private
browsing context count, that would be mistaken for the last private
browsing context going away.

Changing to only count non-chrome browsing contexts makes us only fire
'last-pb-context-exited' once, and since we count them in the parent
there is no missing information about contexts that makes us wait for
a content process about telling us about insertion or removal of
browsing contexts.

Differential Revision: https://phabricator.services.mozilla.com/D118182
2021-07-05 13:16:49 +00:00
Marian-Vasile Laza 47a2086ba6 Backed out changeset 4854ff4fff72 (bug 1701303) for causing bustages on nsDocShell.cpp. CLOSED TREE 2021-07-05 14:21:48 +03:00
Andreas Farre 56b9a33c06 Bug 1701303 - Move counting of private browsing contexts to parent process. r=smaug,johannh
Move the counting of private browsing contexts to the parent
process. Also change to only consider non-chrome browsing contexts
when counting private contexts. The latter is possible due to bug
1528115, because we no longer need to support hidden private windows.

With counting in the parent process we can make sure that when we're
changing remoteness on a private browsing context the private browsing
context count never drops to zero. This fixes an issue with Fission,
where we remoteness changes could transiently have a zero private
browsing context count, that would be mistaken for the last private
browsing context going away.

Changing to only count non-chrome browsing contexts makes us only fire
'last-pb-context-exited' once, and since we count them in the parent
there is no missing information about contexts that makes us wait for
a content process about telling us about insertion or removal of
browsing contexts.

Differential Revision: https://phabricator.services.mozilla.com/D118182
2021-07-05 09:30:53 +00:00
Kashav Madan f837d38879 Bug 1716845 - Test that we restore iframe scroll on back/forward, r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D118877
2021-07-01 15:39:29 +00:00
Masayuki Nakano 63d372da2f Bug 1676702 - part 2: Make `TextControlState` initialize `TextEditor` with `PasswordMaskData` r=m_kato
During a `TextControlState` alive, `PasswordMaskData` should be alive too.
Otherwise, we cannot keep unmasked range at reframing.

Depends on D118756

Differential Revision: https://phabricator.services.mozilla.com/D118757
2021-06-28 04:37:54 +00:00
Kashav Madan 0d34540a2e Bug 1703692 - Use ChildOffset to build the offset path for flushes, r=nika
We can't rely on the Children list since it may have been cleared on shutdown.
Since we don't clear parent edges, walking the parent chain and using
mChildOffset works.

Differential Revision: https://phabricator.services.mozilla.com/D118384
2021-06-26 20:25:29 +00:00
Kashav Madan 2b70b9d821 Bug 1703692 - Store the latest embedder's permanent key on CanonicalBrowsingContext, r=nika,mccr8
And include it in Session Store flushes to avoid dropping updates in case the
browser is unavailable.

Differential Revision: https://phabricator.services.mozilla.com/D118385
2021-06-26 20:25:29 +00:00
Dorel Luca 40fe0b4056 Backed out 3 changesets (bug 1703692) for Browser-chrome failures in browser/components/sessionstore/test/browser_broadcast.js. CLOSED TREE
Backed out changeset fe5703d7b580 (bug 1703692)
Backed out changeset eec4a4138ca7 (bug 1703692)
Backed out changeset 6745b363a745 (bug 1703692)
2021-06-26 10:09:23 +03:00
Kashav Madan 748ca3f0ed Bug 1703692 - Use ChildOffset to build the offset path for flushes, r=nika
We can't rely on the Children list since it may have been cleared on shutdown.
Since we don't clear parent edges, walking the parent chain and using
mChildOffset works.

Differential Revision: https://phabricator.services.mozilla.com/D118384
2021-06-26 05:49:12 +00:00
Kashav Madan e6788be168 Bug 1703692 - Store the latest embedder's permanent key on CanonicalBrowsingContext, r=nika,mccr8
And include it in Session Store flushes to avoid dropping updates in case the
browser is unavailable.

Differential Revision: https://phabricator.services.mozilla.com/D118385
2021-06-26 05:49:12 +00:00
Sandor Molnar d5946f0a7e Backed out changeset b46a490223a1 (bug 1717983) for causing android failures. CLOSED TREE 2021-06-25 03:29:08 +03:00
Iulian Moraru 7a2e51ed62 Backed out 3 changesets (bug 1703692) for causing bc failures on multiple files.
Backed out changeset a199dfd8ce8d (bug 1703692)
Backed out changeset 599a0a99ded9 (bug 1703692)
Backed out changeset 14fe807e6be4 (bug 1703692)
2021-06-25 00:43:23 +03:00
Emilio Cobos Álvarez 72c62d51c7 Bug 1717983 - Improve PresShell active flag handling. r=nika
This moves the logic of whether a pres shell should be active to a
single place to make it sane to reason about, and fixes the
subdocument propagation when a BrowserChild becomes visible.

Differential Revision: https://phabricator.services.mozilla.com/D118703
2021-06-24 20:50:10 +00:00
Kashav Madan 7c9cce86f8 Bug 1703692 - Use ChildOffset to build the offset path for flushes, r=nika
We can't rely on the Children list since it may have been cleared on shutdown.
Since we don't clear parent edges, walking the parent chain and using
mChildOffset works.

Differential Revision: https://phabricator.services.mozilla.com/D118384
2021-06-24 20:26:14 +00:00
Kashav Madan c75e110512 Bug 1703692 - Store the latest embedder's permanent key on CanonicalBrowsingContext, r=nika,mccr8
And include it in Session Store flushes to avoid dropping updates in case the
browser is unavailable.

Differential Revision: https://phabricator.services.mozilla.com/D118385
2021-06-24 20:26:13 +00:00
Nika Layzell fa34581901 Bug 1713903 - Unskip new platform fission tests in docshell/test/browser/browser.ini, r=annyG
Differential Revision: https://phabricator.services.mozilla.com/D118517
2021-06-22 18:18:09 +00:00
Kris Maglione e477097b53 Bug 1709466: Don't prepare for process change when already discarded. r=nika
If a <browser> is removed in the middle of a process change, the previous
DocShell may be torn down while it's still expecting a process change. There's
really nothing more to do in that case, though, so we can just skip the
PrepareForProcessChange call rather than asserting.

Differential Revision: https://phabricator.services.mozilla.com/D118514
2021-06-22 17:42:35 +00:00
Hubert Boma Manilla f573018cb6 Bug 1716964 - Expose defaultLoadFlags on the BrowsingContext for use by the devtools r=ochameau,nika
Differential Revision: https://phabricator.services.mozilla.com/D118152
2021-06-21 16:05:08 +00:00
Henri Sivonen 7df7939f77 Bug 1713627 - Remove code obsoleted by the replacing the Text Encoding menu with one item. r=jaws,emk
Differential Revision: https://phabricator.services.mozilla.com/D116391
2021-06-21 12:09:01 +00:00
Peter Van der Beken 71e7900a51 Bug 1711544 - Move decision about name resetting to the parent process if we're replacing the BC for BFCache in the parent. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D116759
2021-06-21 10:31:36 +00:00
Dorel Luca 2118316ba4 Backed out changeset 4891a17c55e2 (bug 1713627) for Browser-chrome failures in docshell/test/browser/browser_bug673087-1.js. CLOSED TREE 2021-06-21 12:10:54 +03:00
Henri Sivonen abbbf94915 Bug 1713627 - Remove code obsoleted by the replacing the Text Encoding menu with one item. r=jaws,emk
Differential Revision: https://phabricator.services.mozilla.com/D116391
2021-06-21 08:09:43 +00:00
Andi-Bogdan Postelnicu f07c975367 Bug 1519636 - Reformat recent changes to the Google coding style. r=necko-reviewers,emilio
Updated with clang-format version 12.0.0 (taskcluster-FZRqPXamQIOU_i4hF0cAcg)

Differential Revision: https://phabricator.services.mozilla.com/D117905
2021-06-17 11:00:22 +00:00
Kashav Madan cb6768b9ef Bug 1716444 - Don't do final tab state flush for replaced contexts, r=farre,annyG
If we're destroying the frame loader of a replaced browsing context we'll end up
firing browser-shutdown-tabstate-updated for a tab that wasn't actually closed.

This results in us cleaning up Session Store state earlier than expected, which
means we drop future updates to SessionStoreInternal._closedTabs.

Fixes browser_sessionHistory.js, browser_async_remove_tab.js, and possibly
browser_491168.js for SHIP+BFCache.

Differential Revision: https://phabricator.services.mozilla.com/D117944
2021-06-16 14:05:53 +00:00
Olli Pettay e74620fbda Bug 1688712, when replacing a LoadingSessionHistoryInfo, initialize member variables using values from the old object, r=annyG
Differential Revision: https://phabricator.services.mozilla.com/D117362
2021-06-16 10:31:56 +00:00
Kashav Madan 577616f5ab Bug 1701337 - Respect browser.sessionstore.debug.no_auto_updates in native flushers, r=nika
We should not be doing any timed flushes if the pref is set to true.

See https://searchfox.org/mozilla-central/rev/d97dca5907e2a0a77a2435b24ef980268cd3c4fe/browser/components/sessionstore/ContentSessionStore.jsm#402
for how the pref is used in non-SHIP code.

Fixes browser_async_window_flushing.js, which relies on us not sending automatic
updates.

Differential Revision: https://phabricator.services.mozilla.com/D117953
2021-06-16 00:37:53 +00:00
Kris Maglione 991622f532 Bug 1716516: Fix race in test_allowJavascript.
Differential Revision: https://phabricator.services.mozilla.com/D117951
2021-06-15 22:06:49 +00:00
Andrew Halberstadt 7a16af4434 Bug 1700781 - Skip failing mochitest-plain tests with fission + xorigin, r=jmaher
Differential Revision: https://phabricator.services.mozilla.com/D117704
2021-06-15 18:24:18 +00:00
Olli Pettay 0d3cc17e7f Bug 1697905, requestedIndex may not always be cleared, r=peterv
The previous version was trying to make index handling too generic.
But history loads need to update index to the requested index, not to the index of the current entry,
because the requested index was already passed to the child process when the
history load started. If there are several pending history loads, commit of the first one
will update the index based on requested index and send new index to the child.
When child side receives the index update, other pending history loads have been already
processed.

New loads can just clear the requested index, since the child side has
PendingSHistoryChange object to update the effective index and length to the
correct one and when parent side sends back the current index and length the
relevant PendingSHistoryChange object is removed.

With this version both
testing/web-platform/tests/old-tests/submission/Microsoft/history/history_000.htm
and
docshell/test/navigation/browser_test_simultaneous_normal_and_history_loads.js
pass now even on a debug build.


I think there might be a case for the issue happening also without SHIP, but
since it is way less asynchronous, triggering that issue is hard.
So the patch and test are for SHIP only.

Differential Revision: https://phabricator.services.mozilla.com/D116744
2021-06-15 16:21:07 +00:00
Kashav Madan 1a33a37654 Bug 1715852 - Fix SessionHistoryEntry::mSrcdocData to work with session restore, r=peterv
Not setting mIsSrcdocEntry causes us to drop srcdoc data and not set
INTERNAL_LOAD_FLAGS_IS_SRCDOC in FillLoadInfo for srcdoc restores.

Differential Revision: https://phabricator.services.mozilla.com/D117479
2021-06-15 13:34:01 +00:00
Yaron Tausky 768366d7b8 Bug 1496997 - Remove dom.serviceWorkers.parent_intercept pref r=asuth,dom-workers-and-storage-reviewers,perftest-reviewers,jgraham,sparky,webdriver-reviewers,whimboo
Differential Revision: https://phabricator.services.mozilla.com/D101788
2021-06-15 08:52:39 +00:00
Kris Maglione ae436f55ec Bug 1646560: Part 2 - Move allowJavascript and friends from DocShell to BrowsingContext and WindowContext. r=jdescottes,nika,geckoview-reviewers,devtools-backward-compat-reviewers,agi
This is slightly complicated by the fact that the editor code wants to be able
to set this from the content process, so we really need separate
BrowsingContext and WindowContext flags, the latter of which can be set by the
owning process.

Differential Revision: https://phabricator.services.mozilla.com/D114899
2021-06-15 04:40:11 +00:00
Kris Maglione b3c34d273e Bug 1646560: Part 1 - Move some XPCShell content helpers to generic shared module. r=nika
They were originally written for the extension framework, but have been used
more and more widely ever since.

Differential Revision: https://phabricator.services.mozilla.com/D114898
2021-06-15 04:40:10 +00:00
Tim Huang e2b6812898 Bug 1706616 - Part 1: Add telemetry probe for query stripping. r=dimi,necko-reviewers,dragana
Differential Revision: https://phabricator.services.mozilla.com/D117006
2021-06-14 19:45:39 +00:00
Emilio Cobos Álvarez 9db2aa0440 Bug 1699837 - Make sure that remote iframes honor print settings. r=mattwoodrow
This fixes it since we honor the print resolution properly now.

Differential Revision: https://phabricator.services.mozilla.com/D115263
2021-06-13 09:16:53 +00:00
Dana Keeler ef0a88c6f2 Bug 1715142 - introduce nsIPublicKeyPinningService and remove 'type' parameter from nsISiteSecurityService r=rmf,necko-reviewers
The public key pinning implementation is much less complex than the HSTS
implementation, and only needs a small subset of the parameters of the latter.
Furthermore, the information it relies on is static, and so is safe to access
from content processes. This patch separates the two implementations, thus
simplifying both of them and avoiding some unnecessary IPC calls in the
process.

Differential Revision: https://phabricator.services.mozilla.com/D117096
2021-06-12 01:12:25 +00:00
Anny Gakhokidze ae1a9ec1c3 Bug 1709136 - Part 2: Update SessionHistoryEntry in ReplaceLoadingSessionHistoryEntryForLoad, r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D117238
2021-06-11 20:12:10 +00:00
Butkovits Atila e4394b27a2 Backed out 3 changesets (bug 1715142) for causing build bustages. CLOSED TREE
Backed out changeset 7e67994f6a65 (bug 1715142)
Backed out changeset f58d5156f332 (bug 1715142)
Backed out changeset f8a7bd4519c6 (bug 1715142)
2021-06-11 21:20:02 +03:00
Dana Keeler f84faf1bf5 Bug 1715142 - introduce nsIPublicKeyPinningService and remove 'type' parameter from nsISiteSecurityService r=rmf,necko-reviewers
The public key pinning implementation is much less complex than the HSTS
implementation, and only needs a small subset of the parameters of the latter.
Furthermore, the information it relies on is static, and so is safe to access
from content processes. This patch separates the two implementations, thus
simplifying both of them and avoiding some unnecessary IPC calls in the
process.

Differential Revision: https://phabricator.services.mozilla.com/D117096
2021-06-11 17:58:19 +00:00