Commit Graph

834 Commits

Author SHA1 Message Date
Andreas Farre
dd51467c22 Part 7: Bug 1700623 - Make session storage session store work with Fission. r=nika
Use the newly added session storage data getter to access the session
storage in the parent and store it in session store without a round
trip to content processes.

Depends on D111433

Differential Revision: https://phabricator.services.mozilla.com/D111434
2021-05-26 07:14:06 +00:00
Alexandru Michis
84d8f14b41 Backed out 9 changesets (bug 1700623) for causing bc failures in browser_history_menu.js
CLOSED TREE

Backed out changeset 5eae296ad8b5 (bug 1700623)
Backed out changeset 97c3add3b00a (bug 1700623)
Backed out changeset 7ab483627a27 (bug 1700623)
Backed out changeset a4e673640de5 (bug 1700623)
Backed out changeset 513ea16be430 (bug 1700623)
Backed out changeset 88b4add342df (bug 1700623)
Backed out changeset c13bdee1b526 (bug 1700623)
Backed out changeset 26df421dac02 (bug 1700623)
Backed out changeset 6cd0b7a269e5 (bug 1700623)
2021-05-21 11:43:54 +03:00
Andreas Farre
dc6296a1ba Part 7: Bug 1700623 - Make session storage session store work with Fission. r=nika
Use the newly added session storage data getter to access the session
storage in the parent and store it in session store without a round
trip to content processes.

Depends on D111433

Differential Revision: https://phabricator.services.mozilla.com/D111434
2021-05-20 12:48:23 +00:00
Nika Layzell
e5c18b9776 Bug 1471327 - Eagerly create initial about:blank document for in-process browsers, r=kmag
Differential Revision: https://phabricator.services.mozilla.com/D114788
2021-05-19 16:02:33 +00:00
Kris Maglione
08a972cffb Bug 1702678: Handle corner case when opener window is closed from a nested event loop during open. r=nika
Differential Revision: https://phabricator.services.mozilla.com/D111179
2021-05-07 03:00:13 +00:00
Sandor Molnar
6e3ee2f845 Backed out changeset 761fdc9f84d2 (bug 1702678) for causing assertion failures in windowwatcher/nsWindowWatcher. CLOSED TREE 2021-05-07 05:31:41 +03:00
Kris Maglione
a66c7d06cb Bug 1702678: Handle corner case when opener window is closed from a nested event loop during open. r=nika
Differential Revision: https://phabricator.services.mozilla.com/D111179
2021-05-07 01:25:32 +00:00
Dorel Luca
d7fb1f865f Backed out changeset 0672855335bc (bug 1702678) for Mochitest failures in toolkit/components/windowwatcher/nsWindowWatcher.cpp. CLOSED TREE 2021-05-05 02:01:05 +03:00
Kris Maglione
314594a5ea Bug 1702678: Handle corner case when opener window is closed from a nested event loop during open. r=nika
Differential Revision: https://phabricator.services.mozilla.com/D111179
2021-05-04 21:19:22 +00:00
Emilio Cobos Álvarez
d14a43f487 Bug 1705757 - Make printing a single frame choose the right process for the preview frame. r=nika
We were using the top BrowsingContextGroup id in this case, which is
obviously wrong. Also make the API take a BrowsingContext directly,
rather than passing outerwindowids around.

Differential Revision: https://phabricator.services.mozilla.com/D112413
2021-04-17 18:41:11 +00:00
Emilio Cobos Álvarez
9afefdd884 Bug 1705757 - Move FrameLoader.print to BrowsingContext.print. r=nika,remote-protocol-reviewers,marionette-reviewers,extension-reviewers,zombie
This makes it trivial to choose the right BrowserParent to print a
browsing context, by removing the OuterWindowID / FrameLoader
indirections.

Differential Revision: https://phabricator.services.mozilla.com/D112412
2021-04-17 18:41:11 +00:00
Andrew McCreight
dafba67ef6 Bug 1704545, part 1 - Make the priority manager's OnRemoteBrowserFrameShown into a direct call. r=gsvelto
ParticularProcessPriorityManager observes remote-browser-shown and recomputes
the priority for the given browser. This patch eliminates the observer call
and instead makes the frame loader do a direct call.

I think doing it this way is a little clearer, and also the next patch will
eliminate the other reason ParticularProcessPriorityManager is an observer,
which will let us not not register something as an observer for every content
process, which I think is also good.

There should be no change in behavior.

Differential Revision: https://phabricator.services.mozilla.com/D111653
2021-04-12 23:42:52 +00:00
David Parks
d05df71761 Bug 1682030 - Remove PPluginWidget. r=jmathies,ipc-reviewers,nika
Removes the NPAPI plugin widget actor and its proxy, as part of removing all of NPAPI plugin support.

Differential Revision: https://phabricator.services.mozilla.com/D107141
2021-04-06 19:28:11 +00:00
Csoregi Natalia
d68661e2cc Backed out 24 changesets (bug 1682030) for bustage on ProcessHangMonitor.cpp and nsCOMPtr.h. CLOSED TREE
Backed out changeset 5b1644096477 (bug 1682030)
Backed out changeset 35ae60eea3c7 (bug 1682030)
Backed out changeset 3eca76a6d639 (bug 1682030)
Backed out changeset 259c45447ad9 (bug 1682030)
Backed out changeset de9222dc8c31 (bug 1682030)
Backed out changeset 2986c7e14349 (bug 1682030)
Backed out changeset 6af3410bdb93 (bug 1682030)
Backed out changeset 42b0621c2927 (bug 1682030)
Backed out changeset 366e3e371858 (bug 1682030)
Backed out changeset 9adb2865adea (bug 1682030)
Backed out changeset 6af6af3bc03a (bug 1682030)
Backed out changeset da94a91b35ae (bug 1682030)
Backed out changeset 9143da258d0e (bug 1682030)
Backed out changeset 5e20d06952ba (bug 1682030)
Backed out changeset 6253d7e1ce7d (bug 1682030)
Backed out changeset 0e06ddeea3e2 (bug 1682030)
Backed out changeset 9c58d57c9e44 (bug 1682030)
Backed out changeset e90edd89430e (bug 1682030)
Backed out changeset 5861b8166b10 (bug 1682030)
Backed out changeset b4b88cdc7993 (bug 1682030)
Backed out changeset b80054e9805c (bug 1682030)
Backed out changeset 580d857674c0 (bug 1682030)
Backed out changeset a9cdf93c2662 (bug 1682030)
Backed out changeset 9c9c8b4998e2 (bug 1682030)
2021-04-06 03:54:12 +03:00
David Parks
45f5dd79ff Bug 1682030 - Remove PPluginWidget. r=jmathies,ipc-reviewers,nika
Removes the NPAPI plugin widget actor and its proxy, as part of removing all of NPAPI plugin support.

Differential Revision: https://phabricator.services.mozilla.com/D107141
2021-04-05 23:48:34 +00:00
Nika Layzell
274d7e3edd Bug 1699721 - Part 2: Track BrowserParent lifecycles during process switches, r=kmag
This patch contains a large number of changes around the process switching
mechanism in order to avoid issues which are caused by a mismatched
understanding of the state of the process switch between processes in the
presence of nested event loops.

This includes:
 1. The "InFlightProcessId" value is no longer recorded. All remaining uses
    were removed in part 1, and the new mechanism tracks this information in
    a better way.
 2. The current BrowserParent instance is now tracked on
    CanonicalBrowsingContext, meaning that logic which needs to work with this
    information can now access it without depending on the current
    WindowGlobalParent instance.
 3. When doing a process switch, the previous host process for the
    BrowsingContext is tracked until the process switch is completed, allowing
    for future attempts to switch into that process to be delayed until the
    previous unload event has finished running.
 4. The process switch logic was refactored to simplify some of the
    error-handling logic, and share more code between different cases.

Differential Revision: https://phabricator.services.mozilla.com/D110002
2021-03-31 16:51:58 +00:00
Andreea Pavel
35eeef915f Backed out 3 changesets (bug 1699721) for failing test_bug1699721.html on a CLOSED TREE
Backed out changeset ed3feb801017 (bug 1699721)
Backed out changeset d6f212c67002 (bug 1699721)
Backed out changeset ef06d9764cf1 (bug 1699721)
2021-03-31 19:27:34 +03:00
Nika Layzell
45d7327477 Bug 1699721 - Part 2: Track BrowserParent lifecycles during process switches, r=kmag
This patch contains a large number of changes around the process switching
mechanism in order to avoid issues which are caused by a mismatched
understanding of the state of the process switch between processes in the
presence of nested event loops.

This includes:
 1. The "InFlightProcessId" value is no longer recorded. All remaining uses
    were removed in part 1, and the new mechanism tracks this information in
    a better way.
 2. The current BrowserParent instance is now tracked on
    CanonicalBrowsingContext, meaning that logic which needs to work with this
    information can now access it without depending on the current
    WindowGlobalParent instance.
 3. When doing a process switch, the previous host process for the
    BrowsingContext is tracked until the process switch is completed, allowing
    for future attempts to switch into that process to be delayed until the
    previous unload event has finished running.
 4. The process switch logic was refactored to simplify some of the
    error-handling logic, and share more code between different cases.

Differential Revision: https://phabricator.services.mozilla.com/D110002
2021-03-31 15:37:49 +00:00
Andreas Farre
9dbb5e15f5 Bug 1572084 - Part 3: Force session store flush order. r=nika
We need a call to nsFrameLoader::RequestTabStateFlush to flush the
toplevel context first. That way we can ensure that session storage is
flushed consistently.

Differential Revision: https://phabricator.services.mozilla.com/D108938
2021-03-26 08:59:34 +00:00
Andreas Farre
f722be009c Bug 1572084 - Part 2: Make Session Store data collection work with fission. r=nika
Instead of collecting data from the entire tree of documents, we
collect data per document. The collected data is sent to the
corresponding parent window context and is applied incrementally to
the tab state cache.

Differential Revision: https://phabricator.services.mozilla.com/D107814
2021-03-26 08:59:33 +00:00
Bogdan Tara
8f9d044d0f Backed out 3 changesets (bug 1572084) for WindowGlobalParent.cpp related failures CLOSED TREE
Backed out changeset d42a68132e7e (bug 1572084)
Backed out changeset 4d5a5ac074e6 (bug 1572084)
Backed out changeset 5aa59e106a42 (bug 1572084)
2021-03-25 18:56:02 +02:00
Andreas Farre
a4da022c74 Bug 1572084 - Part 3: Force session store flush order. r=nika
We need a call to nsFrameLoader::RequestTabStateFlush to flush the
toplevel context first. That way we can ensure that session storage is
flushed consistently.

Differential Revision: https://phabricator.services.mozilla.com/D108938
2021-03-25 15:36:38 +00:00
Andreas Farre
728f061c16 Bug 1572084 - Part 2: Make Session Store data collection work with fission. r=nika
Instead of collecting data from the entire tree of documents, we
collect data per document. The collected data is sent to the
corresponding parent window context and is applied incrementally to
the tab state cache.

Differential Revision: https://phabricator.services.mozilla.com/D107814
2021-03-25 15:36:38 +00:00
Olli Pettay
67eda3a866 Bug 1697838, explictly evict bfcache when doing a frameloader swap r=peterv
This is in practice the behavior already, because swap is really a move and removing the old tab, and
when removing the other tab, the bfcached frameloaders are destroyed. But they stay still in the session history.
So this patch clears session history explicitly.

As long as we have message managers, we can't really support bfcache in this case, since we can't swap message managers,
there are no corresponding managers on the other side.
Message managers need to stay always in the original window, since the listeners are from there.

WindowActors do move with frameloader/browsingcontext, but that leads easily to memory leaks.
https://bugzilla.mozilla.org/show_bug.cgi?id=1697918 is about that and it has nothing to do with bfcache.

Differential Revision: https://phabricator.services.mozilla.com/D108273
2021-03-24 18:57:14 +00:00
Simon Giesecke
4a308827e3 Bug 708901 - Migrate to nsTHashSet in ipc. r=ipc-reviewers,nika
Differential Revision: https://phabricator.services.mozilla.com/D109322
2021-03-24 17:56:48 +00:00
Csoregi Natalia
f54ee076ae Backed out 13 changesets (bug 708901, bug 1184468) for causing build bustage on GeckoViewHistory.cpp. CLOSED TREE
Backed out changeset b1e4c01e63b8 (bug 708901)
Backed out changeset 37b52cce83c0 (bug 708901)
Backed out changeset eee75f33f060 (bug 708901)
Backed out changeset 479bf64c7986 (bug 708901)
Backed out changeset 15a8fb94d15d (bug 708901)
Backed out changeset be31ccd9a61d (bug 708901)
Backed out changeset fc54f4eaedd5 (bug 708901)
Backed out changeset 03c3a56c3d13 (bug 708901)
Backed out changeset 73f11d3c1298 (bug 708901)
Backed out changeset aed22fd80893 (bug 708901)
Backed out changeset 74d8249fbe7e (bug 708901)
Backed out changeset acb725eb3c1d (bug 1184468)
Backed out changeset 70f3ea6efec4 (bug 1184468)
2021-03-24 19:26:20 +02:00
Simon Giesecke
b07f34785d Bug 708901 - Migrate to nsTHashSet in ipc. r=ipc-reviewers,nika
Differential Revision: https://phabricator.services.mozilla.com/D109322
2021-03-24 16:59:00 +00:00
Kagami Sascha Rosylight
9441435604 Bug 1699332 - Remove remaining presentation URL references r=annevk
Differential Revision: https://phabricator.services.mozilla.com/D109010
2021-03-19 12:36:57 +00:00
Anny Gakhokidze
aa3895af8c Bug 1597427 - Check for recursive subframe loads in the parent process, r=kmag,necko-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D107311
2021-03-11 00:39:37 +00:00
Nika Layzell
af56264610 Bug 1663757 - Part 2: Don't suspend webProgress on process switch, r=annyG,mattwoodrow
Previously, we would need to suspend progress events from the previous
BrowserParent, as otherwise we would receive STATE_STOP progress notifications
from the previous browser when it is destroyed, which would throw off frontend
code. With the new checks added by part 1, we will now catch these cases by
detecting that the current window global has changed, and we can get rid of this
explicit override.

Differential Revision: https://phabricator.services.mozilla.com/D105557
2021-03-09 15:29:40 +00:00
Olli Pettay
0d29b12841 Bug 1689601, Rename RemotenessChangeState to RemotenessChangeOptions, r=peterv
This addresses part of the review comment from https://phabricator.services.mozilla.com/D105229

Differential Revision: https://phabricator.services.mozilla.com/D106561
2021-03-02 12:13:21 +00:00
Olli Pettay
0d8dbfb17e Bug 1689601, evict frameloaders from bfcache (missing still the time based eviction), r=peterv
Differential Revision: https://phabricator.services.mozilla.com/D105239
2021-03-02 12:13:20 +00:00
Olli Pettay
911d46a8b6 Bug 1689601, try to use bfcache for top level pages, r=peterv
Differential Revision: https://phabricator.services.mozilla.com/D105238
2021-03-02 12:13:20 +00:00
Olli Pettay
3df3621351 Bug 1689601, pass various states of remoteness change / browsing context swap using a helper struct, r=peterv
The name RemotenessChangeState uses same the convention as the related methods, even though there might
not be a remoteness change happening, only a browsing context switch. But the naming
inconsistency exists there even without any bfcache work.

RemotenessChangeState will be renamed to RemotenessChangeOptions in a followup.

Differential Revision: https://phabricator.services.mozilla.com/D105229
2021-03-02 12:13:16 +00:00
Mihai Alexandru Michis
87f481bf9a Backed out 16 changesets (bug 1689601) for causing cpp bustages in nsFrameLoader.
CLOSED TREE

Backed out changeset 6e5523a7210d (bug 1689601)
Backed out changeset 745eaa468c74 (bug 1689601)
Backed out changeset a594bd02b8b6 (bug 1689601)
Backed out changeset 0c5fe977ced6 (bug 1689601)
Backed out changeset 2fca23521891 (bug 1689601)
Backed out changeset 334aeb627855 (bug 1689601)
Backed out changeset 2b2081a15d67 (bug 1689601)
Backed out changeset 307bde43cc96 (bug 1689601)
Backed out changeset 04aadec67ce2 (bug 1689601)
Backed out changeset 701eccb34772 (bug 1689601)
Backed out changeset 278db692aa8b (bug 1689601)
Backed out changeset c261c243a64d (bug 1689601)
Backed out changeset 7e8022e5696a (bug 1689601)
Backed out changeset 6138bfc6c08d (bug 1689601)
Backed out changeset 63295b3a62d0 (bug 1689601)
Backed out changeset 6d02e59ddc51 (bug 1689601)
2021-03-02 13:15:10 +02:00
Olli Pettay
42a29f41de Bug 1689601, Rename RemotenessChangeState to RemotenessChangeOptions, r=peterv
This addresses part of the review comment from https://phabricator.services.mozilla.com/D105229

Differential Revision: https://phabricator.services.mozilla.com/D106561
2021-03-02 09:44:13 +00:00
Olli Pettay
07a607c53d Bug 1689601, evict frameloaders from bfcache (missing still the time based eviction), r=peterv
Differential Revision: https://phabricator.services.mozilla.com/D105239
2021-03-02 09:44:13 +00:00
Olli Pettay
101955fa30 Bug 1689601, try to use bfcache for top level pages, r=peterv
Differential Revision: https://phabricator.services.mozilla.com/D105238
2021-03-02 09:44:12 +00:00
Olli Pettay
0b5b9fc66a Bug 1689601, pass various states of remoteness change / browsing context swap using a helper struct, r=peterv
The name RemotenessChangeState uses same the convention as the related methods, even though there might
not be a remoteness change happening, only a browsing context switch. But the naming
inconsistency exists there even without any bfcache work.

RemotenessChangeState will be renamed to RemotenessChangeOptions in a followup.

Differential Revision: https://phabricator.services.mozilla.com/D105229
2021-03-02 09:44:09 +00:00
Gerald Squelart
2416d881e2 Bug 1691589 - Reduce reliance on GeckoProfiler.h when only labels (and maybe markers) are needed - r=necko-reviewers,geckoview-reviewers,sg,agi,florian
There are no code changes, only #include changes.
It was a fairly mechanical process: Search for all "AUTO_PROFILER_LABEL", and in each file, if only labels are used, convert "GeckoProfiler.h" into "ProfilerLabels.h" (or just add that last one where needed).
In some files, there were also some marker calls but no other profiler-related calls, in these cases "GeckoProfiler.h" was replaced with both "ProfilerLabels.h" and "ProfilerMarkers.h", which still helps in reducing the use of the all-encompassing "GeckoProfiler.h".

Differential Revision: https://phabricator.services.mozilla.com/D104588
2021-02-16 04:44:19 +00:00
Kris Maglione
4c823d6e30 Bug 1602501: Update TabListener owner content when swapping frame loaders. r=peterv
Differential Revision: https://phabricator.services.mozilla.com/D103722
2021-02-03 19:28:06 +00:00
Olli Pettay
affb60b285 Bug 1683751 - Removing iframes should update history.length r=peterv
Differential Revision: https://phabricator.services.mozilla.com/D100274
2021-02-03 00:02:29 +00:00
Randell Jesup
140a416459 Bug 1673617 - Create BrowsingContext::mChildSessionHistory more aggressively, r=nika
Differential Revision: https://phabricator.services.mozilla.com/D100348
2021-02-01 22:57:12 +00:00
Butkovits Atila
2ec71c47a0 Backed out 3 changesets (bug 1673617) for causing failure on browser_child_resource.js. CLOSED TREE
Backed out changeset 2a0dd70342ce (bug 1673617)
Backed out changeset 6fa47045b11b (bug 1673617)
Backed out changeset d230e44fd9be (bug 1673617)
2021-01-23 04:40:22 +02:00
Randell Jesup
0863cad62d Bug 1673617 - Create BrowsingContext::mChildSessionHistory more aggressively, r=nika
Differential Revision: https://phabricator.services.mozilla.com/D100348
2021-01-22 22:01:39 +00:00
Neil Deakin
2ae4d6a15b Bug 1644911, add access to the childID from the frame crashed event, r=nika
Differential Revision: https://phabricator.services.mozilla.com/D98206
2021-01-21 08:44:51 +00:00
Geoff Lankow
117b381c5e Bug 1683783 - Allow Thunderbird to load remote browsers in about:preferences. r=nika
Thunderbird loads moz-extension: pages in about:preferences to allow configuration of FileLink extensions. When remote extensions are enabled this will need to be done with a remote browser.

Differential Revision: https://phabricator.services.mozilla.com/D99844
2021-01-20 01:09:35 +00:00
Dorel Luca
f3c332c453 Backed out 2 changesets (bug 1572798) for multiple failures. CLOSED TREE
Backed out changeset cfdebb863454 (bug 1572798)
Backed out changeset f2d3a6800638 (bug 1572798)
2021-01-20 00:15:48 +02:00
Emilio Cobos Álvarez
43d39a406f Bug 1572798 - Explicitly check for top contexts because devtools creates it.
MANUAL PUSH: Last minute orange on a CLOSED TREE
2021-01-19 21:25:39 +01:00
Emilio Cobos Álvarez
333b73de84 Bug 1572798 - Make content browsing contexts for tabs start as inactive. r=nika
Otherwise autoplay blocking until-in-foreground breaks with the other
patch in this bug, because it unblocks media playback once a browsing
context is active for the first time.

Differential Revision: https://phabricator.services.mozilla.com/D42329
2021-01-19 19:14:33 +00:00