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

8209 Коммитов

Автор SHA1 Сообщение Дата
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
Noemi Erli b7da3f34ee Backed out changeset f45996fe15b2 (bug 1618547) for causing failures in browser_ProcessPriorityManager.js CLOSED TREE 2021-05-06 00:53:54 +03:00
Nika Layzell e6838de735 Bug 1535913 - Orchestrate content BCG destruction from parent, r=farre
This should help avoid crashes caused when the content process has
already destroyed a BCG when the parent process hasn't yet. The BCG will
still be destroyed when the content process shuts down using normal
cycle-collection.

Differential Revision: https://phabricator.services.mozilla.com/D113828
2021-05-05 21:00:05 +00:00
Andrew McCreight 063f9001b0 Bug 1618547 - Support Fission in the process priority manager. r=kmag,gsvelto
With Fission, there can be multiple BrowserParents in a single tab, so
this patch moves the tracking of active tabs onto the top BrowsingContext
in a tab. If the priority of a top BC is changed, then the activity
of all of the BPs of the BCs in the tree are all adjusted. The flag
that tracks this state gets carried forward to the new BC in the case
of a cross-group navigation by the changes in ReplacedBy().

The other change here covers the case where we do a process-switching
navigation on an iframe. If we create a new BrowserParent with an active
top BC, then the BP gets marked as active in the priority manager. Doing
this tracking on the BP instead of the BC (both here in and in the part
that landed previously in BrowserParent::Deactivated()) means that we
don't need to track down every place that a BC switches processes.

I left the tracking of activity in ParticularProcessPriorityManager
centered around BrowserParents, instead of changing it to BCs, to
minimize the changes required. There are some tricky interactions there
with wakelocks that I didn't want to have to figure out.

browser_ProcessPriorityManager.js was set up to track a mapping of
browsers to priorities, but for the purposes of testing Fission support
I changed it to track a mapping of child IDs to priorities.

In the test, I also removed an assignment (this.window = null) that
didn't seem to be doing anything.

Differential Revision: https://phabricator.services.mozilla.com/D112213
2021-05-05 20:29:14 +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
Narcis Beleuzu fc252d1f69 Backed out changeset 5b15696335bd (bug 1696473) for xpcshell failures on test_subframe_stop_after_parent_error.js . CLOSED TREE 2021-05-05 01:12:48 +03:00
Kris Maglione c40721b2ea Bug 1696473: End subframe loads for initial about:blank document on request error. r=nika
Differential Revision: https://phabricator.services.mozilla.com/D112289
2021-05-04 21:19:51 +00: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
Peter Van der Beken 3b711fcd30 Bug 1709316 - Replace the frameloader after marking the BC as not being in BFCache anymore. r=nika
nsFrameLoaderOwner::ReplaceFrameLoader calls nsFocusManager::ActivateRemoteFrameIfNeeded.
If the call to nsFrameLoaderOwner::ReplaceFrameLoader happens before the BC is marked as
not in BFCache, then the focus manager will not fire focus events because the window is
still frozen.

Differential Revision: https://phabricator.services.mozilla.com/D114227
2021-05-04 14:03:57 +00:00
Kashav Madan 976264b9af Bug 1702055 - Replace CallRestoreTabContentComplete with a Promise, r=nika
This should help avoid message ordering issues in the next patches. To ensure
that we're not firing events too early, we now do a "full" restore even if we
don't have form or scroll data, including for about:blank URIs.

This also moves all restore state on the CanonicalBrowsingContext into a
separate `mRestoreState` struct.

Differential Revision: https://phabricator.services.mozilla.com/D110333
2021-05-03 18:16:40 +00:00
Valentin Gosu d28637ceaf Bug 1694662 - Remove nsIApplicationCacheChannel usage from docshell r=dragana
Differential Revision: https://phabricator.services.mozilla.com/D106447
2021-04-30 07:20:21 +00:00
Valentin Gosu 5aa53ddea9 Bug 1694662 - Remove OfflineCache update logic r=necko-reviewers,dragana
Differential Revision: https://phabricator.services.mozilla.com/D106443
2021-04-30 07:20:19 +00:00
Daisuke Akatsuka 3e591d051a Bug 1580881: Make consecutive dots to single.r=adw,mak
Differential Revision: https://phabricator.services.mozilla.com/D111350
2021-04-29 21:13:00 +00:00
Anny Gakhokidze c5100b9329 Bug 1703607 - Exempt about:*pages from new bfcache, with the exception of about:blank, r=peterv
This also fixes test
browser/base/content/test/tabs/browser_navigate_through_urls_origin_attributes.js
which was failing for fission + bfcacheInParent, because about:privatebrowsing
was getting bfcached, and an extra XULFrameLoaderCreated event was firing, when
we were not expecting it.

Differential Revision: https://phabricator.services.mozilla.com/D112441
2021-04-28 20:17:35 +00:00
Henri Sivonen 217757f82d Bug 829543 - Rename hintCharset to reloadEncoding and remove unnecessary code. r=emk
Differential Revision: https://phabricator.services.mozilla.com/D113639
2021-04-28 12:15:47 +00:00
Niklas Goegge b97cd2430b Bug 1708150 - Add user activation flag to reload, goBack and goForward r=ckerschb,Gijs,smaug
Differential Revision: https://phabricator.services.mozilla.com/D110245
2021-04-28 11:26:49 +00:00
Butkovits Atila 2819d98182 Backed out 4 changesets (bug 1702055) for causing failures on /browser_UsageTelemetry_private_and_restore.js. CLOSED TREE
Backed out changeset af21e2d8324e (bug 1702055)
Backed out changeset ff67df9befe5 (bug 1702055)
Backed out changeset b5f0638dcbc4 (bug 1702055)
Backed out changeset bffaa2c203b3 (bug 1702055)
2021-04-28 04:42:09 +03:00
Olli Pettay ce456233be Bug 1706090 - Only allow unload event listeners in bfcache when doing cross-site navigation, r=peterv
Differential Revision: https://phabricator.services.mozilla.com/D112621
2021-04-27 23:30:17 +00:00
Kashav Madan 0fd5870b0c Bug 1702055 - Replace CallRestoreTabContentComplete with a Promise, r=nika
This should help avoid message ordering issues in the next patches. To ensure
that we're not firing events too early, we now do a "full" restore even if we
don't have form or scroll data, including for about:blank URIs.

This also moves all restore state on the CanonicalBrowsingContext into a
separate `mRestoreState` struct.

Differential Revision: https://phabricator.services.mozilla.com/D110333
2021-04-27 19:54:56 +00:00
Joel Maher 39acafe01e Bug 1704636 - run many windows 7-32 tests on windows10x64 via wow64. r=ahal,webdriver-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D112372
2021-04-27 12:44:19 +00:00
Olli Pettay 83625b981f Bug 1704068 - Enable test_multi_sharedWorker_lifetimes_bfcache.html on Fission, r=peterv,emilio
Differential Revision: https://phabricator.services.mozilla.com/D111403
2021-04-26 22:25:58 +00:00
Alexandru Michis 0e762fb5f0 Backed out changeset 4736b477e8cf (bug 1704636) for causing multiple wpt failures.
CLOSED TREE
2021-04-26 19:50:05 +03:00
Joel Maher 1bab60f4c0 Bug 1704636 - run many windows 7-32 tests on windows10x64 via wow64. r=ahal,webdriver-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D112372
2021-04-26 14:43:31 +00:00
Olli Pettay 9b7e635703 Bug 1705489 - update docshell/test/browser/browser_bug1328501.js to pass on Fission+BFCache, r=peterv
The test is using a framescript to have an observer for "http-on-opening-request".
That is used for the actual testpage but we need to prevent the next page to enter bfcache, so that
when going back from the session history frameloader isn't changed.
So in this case disabling bfcache should be fine.

Differential Revision: https://phabricator.services.mozilla.com/D112245
2021-04-20 11:33:16 +00:00
Emilio Cobos Álvarez 294d0f244e Bug 1705877 - Introduce nsIWidget::Cursor. r=dholbert
This removes some sketchy non-caching of cursors on windows while at it,
now that plugins are gone, but otherwise shouldn't change behavior.

Differential Revision: https://phabricator.services.mozilla.com/D112475
2021-04-20 09:47:32 +00:00
Masatoshi Kimura b09353a135 Bug 1234520 - Re-enable test_bug344861.html, test_bug369370.html, test_bug741266.html on Windows. r=dao
Differential Revision: https://phabricator.services.mozilla.com/D112471
2021-04-19 23:01:39 +00:00
Peter Van der Beken f296f5bb9a Bug 1696158 - Move CanSavePresentation to the parent process. Make nsDocShell listen for background requests too. r=smaug,necko-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D112201
2021-04-19 14:50:57 +00:00
Peter Van der Beken cecda3f1ca Bug 1696158 - Move CanSavePresentation to the parent process. Add test. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D110235
2021-04-19 14:50:56 +00:00
Peter Van der Beken 302c37978b Bug 1696158 - Move CanSavePresentation to the parent process. Do CanSavePresentation check completely in parent. r=smaug,nika
Differential Revision: https://phabricator.services.mozilla.com/D110234
2021-04-19 14:50:56 +00:00
Peter Van der Beken 1c8872c7e2 Bug 1696158 - Move CanSavePresentation to the parent process. Move some code. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D111606
2021-04-19 14:50:55 +00:00
Peter Van der Beken 14377359b0 Bug 1696158 - Move CanSavePresentation to the parent process. Notify parent process of requests in the loadgroup. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D110233
2021-04-19 14:50:55 +00:00
smolnar 84a0543987 Backed out 8 changesets (bug 1696158) for causing multiple failures. CLOSED TREE
Backed out changeset 09c598c8fd29 (bug 1696158)
Backed out changeset 02f956c26901 (bug 1696158)
Backed out changeset b61a3a324cce (bug 1696158)
Backed out changeset 95810ed7f1e5 (bug 1696158)
Backed out changeset 4f93a7b61496 (bug 1696158)
Backed out changeset c80c55b56f2a (bug 1696158)
Backed out changeset 11627c409882 (bug 1696158)
Backed out changeset b98b4316a510 (bug 1696158)
2021-04-19 17:04:08 +03:00
Peter Van der Beken 3d4ba1d105 Bug 1696158 - Move CanSavePresentation to the parent process. Make nsDocShell listen for background requests too. r=smaug,necko-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D112201
2021-04-19 12:39:21 +00:00
Peter Van der Beken f594601d76 Bug 1696158 - Move CanSavePresentation to the parent process. Add test. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D110235
2021-04-19 12:39:21 +00:00
Peter Van der Beken 30c3bd8c7e Bug 1696158 - Move CanSavePresentation to the parent process. Do CanSavePresentation check completely in parent. r=smaug,nika
Differential Revision: https://phabricator.services.mozilla.com/D110234
2021-04-19 12:39:20 +00:00
Peter Van der Beken ed3b54b567 Bug 1696158 - Move CanSavePresentation to the parent process. Move some code. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D111606
2021-04-19 12:39:20 +00:00
Peter Van der Beken d68785db97 Bug 1696158 - Move CanSavePresentation to the parent process. Notify parent process of requests in the loadgroup. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D110233
2021-04-19 12:39:20 +00:00
Emilio Cobos Álvarez dffb321319 Bug 1695404 - follow-up: Avoid redundant string copy in Gecko_IsSupportedImageMimeType. r=tnikkel
There's no reason to require a null-terminated string in imgLoader.

Differential Revision: https://phabricator.services.mozilla.com/D112478
2021-04-17 22:21:19 +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
Emilio Cobos Álvarez be83013af7 Bug 1704651 - Fix base toolchains build.
MANUAL PUSH: Trivial bustage fix on a CLOSED TREE
2021-04-17 02:27:50 +02:00
Emilio Cobos Álvarez a4396a711c Bug 1704651 - Trigger stop notification on discard if waiting for it. r=nika
This is enough to fix the leak though perhaps the other patch also makes
sense.

Differential Revision: https://phabricator.services.mozilla.com/D112419
2021-04-16 23:16:41 +00:00
Olli Pettay 7decb1d196 Bug 1676181 - Fix docshell/test/browser/browser_browsingContext-01.js for Fission, r=farre
Differential Revision: https://phabricator.services.mozilla.com/D111442
2021-04-15 13:54:12 +00:00
Hubert Boma Manilla eec8ef34ae Bug 1703786 - Use nsILoadInfo.sandboxFlags instead r=valentin,necko-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D112154
2021-04-15 11:14:23 +00:00
Kashav Madan 4c840a38d9 Bug 1700963 - Add a "browsing-context-did-set-embedder" observer notification, r=nika
Differential Revision: https://phabricator.services.mozilla.com/D111709
2021-04-14 23:36:10 +00:00
Dorel Luca b15d7d893e Backed out 3 changesets (bug 1700963) for Browser-chrome failures in docshell/test/browser/browser_bug1309900_crossProcessHistoryNavigation.js. CLOSED TREE
Backed out changeset cda35e554327 (bug 1700963)
Backed out changeset fbafd75b06d3 (bug 1700963)
Backed out changeset 8b922e4f612b (bug 1700963)
2021-04-14 23:26:05 +03:00
Kashav Madan b4a16788a0 Bug 1700963 - Add a "browsing-context-did-set-embedder" observer notification, r=nika
Depends on D110336

Differential Revision: https://phabricator.services.mozilla.com/D111709
2021-04-14 18:53:06 +00:00
Christoph Kerschbaumer e1c35fda94 Bug 1658924: Implement HTTPS-First and automatically fall back to http if secure top-level connection is not available r=necko-reviewers,JulianWels,mattwoodrow,dragana
Differential Revision: https://phabricator.services.mozilla.com/D111686
2021-04-13 17:43:12 +00:00
Mike Conley cb50d40885 Bug 1686315 - Fix up the last few tests to pass with content prompt subdialogs enabled or disabled. r=Gijs
Critically, this makes sure SubDialog.abort calls SubDialog.close even if its contents haven't finished
loading. This prevents a shutdown leak.

Differential Revision: https://phabricator.services.mozilla.com/D111736
2021-04-13 15:51:49 +00:00
Mike Conley b29a236f04 Bug 1686315 - Fix up more tests to pass with content prompt subdialogs enabled or disabled. r=Gijs
Batch 2 of 2.

Differential Revision: https://phabricator.services.mozilla.com/D110483
2021-04-13 15:51:48 +00:00
Mike Conley 599de83389 Bug 1686315 - Fix up some tests to pass with content prompt subdialogs enabled or disabled. r=Gijs
Batch 1 of 2.

Differential Revision: https://phabricator.services.mozilla.com/D110342
2021-04-13 15:51:48 +00:00
Emilio Cobos Álvarez 3e0cb7c68b Bug 1703289 - Make mixed content blocker use a session-persistent permission rather than ad-hoc code. r=ckerschb,smaug
This is more fission-compatible, and a lot simpler.

Differential Revision: https://phabricator.services.mozilla.com/D111480
2021-04-12 18:04:12 +00:00
Emilio Cobos Álvarez d1e4e528b2 Bug 1703291 - Update root bc state when the root bc changes in the session history. r=smaug
Otherwise when navigating to a replaced browsing context we might have
an incorrect "is single top-level in history".

Fixes test_window_close.html with Fission+bfcache.

Differential Revision: https://phabricator.services.mozilla.com/D111458
2021-04-10 03:29:36 +00:00
Narcis Beleuzu a7ec545704 Backed out 2 changesets (bug 1703291) for bc failures on BrowsingContext.cpp . CLOSED TREE
Backed out changeset 4d216ecbacd9 (bug 1703291)
Backed out changeset 51d244d886aa (bug 1703291)
2021-04-10 00:52:54 +03:00
Anny Gakhokidze 0985861202 Bug 1698601 - Part 2: Carry over restore data to new context after a process swap, r=smaug
Also, make sure we update layout history state from docshell before we load a
new URI, as it might be our last chance to do so before a process swap.

Differential Revision: https://phabricator.services.mozilla.com/D110994
2021-04-09 17:46:52 +00:00
Emilio Cobos Álvarez 85f92a8a49 Bug 1703291 - Update root bc state when the root bc changes in the session history. r=smaug
Otherwise when navigating to a replaced browsing context we might have
an incorrect "is single top-level in history".

Fixes test_window_close.html with Fission+bfcache.

Differential Revision: https://phabricator.services.mozilla.com/D111458
2021-04-09 17:33:50 +00:00
Nika Layzell 4bcdc094f9 Bug 1702714 - GetBrowserBridgeParent may be null after destroy, r=farre
Differential Revision: https://phabricator.services.mozilla.com/D110827
2021-04-09 17:10:18 +00:00
lyavor 75c83b4a52 Bug 1702001 Https-only mode does not reload pages after clicking "Continue to HTTP Site", when url contains navigation r=ckerschb
Differential Revision: https://phabricator.services.mozilla.com/D110395
2021-04-08 14:32:57 +00:00
Csoregi Natalia cfad2d513e Backed out changeset b09095eaf7d9 (bug 1702001) for causing failures on test_insecure_reload.html. CLOSED TREE 2021-04-08 12:28:19 +03:00
lyavor 3322a7eb35 Bug 1702001 Https-only mode does not reload pages after clicking "Continue to HTTP Site", when url contains navigation r=ckerschb
Differential Revision: https://phabricator.services.mozilla.com/D110395
2021-04-08 08:21:34 +00:00
Emilio Cobos Álvarez 4401eff8fe Bug 1703472 - For window.focus, popup abuse level should be checked on the caller. r=smaug,hsivonen
Just like how for window.open() it's checked on the opener, of course.

Note that when sending the focus request via IPC, we trust the check
done on the child (bug 1677899).

Do we have a good test to extend to cover this case?

Differential Revision: https://phabricator.services.mozilla.com/D111107
2021-04-07 16:03:11 +00:00
Olli Pettay 378cc0689d Bug 1702608, ensure the same docshell is used in nsDSURIContentListener, r=kmag
Differential Revision: https://phabricator.services.mozilla.com/D110599
2021-04-07 10:24:58 +00:00
David Parks 7a4e918916 Bug 1682030 - Clean up NPAPI plugin fallback behavior. r=jmathies,emilio
Similifies use of EventStates and ObjectType/FallbackType enums since most states they represented are no longer valid with the removal of NPAPI plugins.  The state machine for (unsupported) plugin elements is now much simpler but still distinguishes between HTML fallbacks, fallbacks leading to a "BROKEN" state (e.g. failing to load the image the element refers to), and fallbacks that would simply lead the element to occupy an empty region.  The last type of fallback is behind a pref "layout.use-plugin-fallback" and is disabled by default.

Simplifying the state machine allows us to clean up nsObjectLoadingContent.  We also update many of the enums which refered to plugins, which would otherwise get confusing.

Differential Revision: https://phabricator.services.mozilla.com/D107158
2021-04-06 19:28:18 +00:00
David Parks 271e591cdf Bug 1682030 - Remove NPAPI blocklisting r=Gijs,jmathies,mixedpuppy
Removes the PluginProvider and NPAPI plugin blocklist handling as part of removing all NPAPI support.  This allows us to remove nsIPluginHost.

Differential Revision: https://phabricator.services.mozilla.com/D107148
2021-04-06 19:28:14 +00:00
Neil Deakin 4ca286a995 Bug 1701668, remove onBeforeLinkTraversal implementations and handle links in docshell, r=kmag,mixedpuppy,geckoview-reviewers,agi
This also fixes links in top or in-process subframes and out-of-process subframes in extensions sidebars and panels so that they open in new tabs.

Differential Revision: https://phabricator.services.mozilla.com/D110102
2021-04-06 18:52:46 +00:00
Neil Deakin 54284e502d Bug 1701668, remove shouldLoadURI and shouldLoadURIInThisProcess methods now that all implementers return true, r=kmag
Differential Revision: https://phabricator.services.mozilla.com/D110101
2021-04-06 18:52:46 +00:00
Andrew McCreight ba77e5e136 Bug 1702791 - Fix typos in comments BrowsingContextGroup.h. DONTBUILD r=farre
Differential Revision: https://phabricator.services.mozilla.com/D110700
2021-04-06 14:39:51 +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 ef8f5b1e09 Bug 1682030 - Clean up NPAPI plugin fallback behavior. r=jmathies,emilio
Similifies use of EventStates and ObjectType/FallbackType enums since most states they represented are no longer valid with the removal of NPAPI plugins.  The state machine for (unsupported) plugin elements is now much simpler but still distinguishes between HTML fallbacks, fallbacks leading to a "BROKEN" state (e.g. failing to load the image the element refers to), and fallbacks that would simply lead the element to occupy an empty region.  The last type of fallback is behind a pref "layout.use-plugin-fallback" and is disabled by default.

Simplifying the state machine allows us to clean up nsObjectLoadingContent.  We also update many of the enums which refered to plugins, which would otherwise get confusing.

Differential Revision: https://phabricator.services.mozilla.com/D107158
2021-04-05 23:48:42 +00:00
David Parks 0e34d4d48b Bug 1682030 - Remove NPAPI blocklisting r=Gijs,jmathies,mixedpuppy
Removes the PluginProvider and NPAPI plugin blocklist handling as part of removing all NPAPI support.  This allows us to remove nsIPluginHost.

Differential Revision: https://phabricator.services.mozilla.com/D107148
2021-04-05 23:48:38 +00:00
Daisuke Akatsuka 316a92df5e Bug 1693503: Do search if the format inputed is user@host but might be intented as keyword. r=mak
Differential Revision: https://phabricator.services.mozilla.com/D106748
2021-04-02 10:05:37 +00:00
Henri Sivonen 9c0fdd5c35 Bug 1696908 - Ensure parent-managed order of setting the focused browsing context. r=nika
Differential Revision: https://phabricator.services.mozilla.com/D98134
2021-04-01 08:45:14 +00:00
Nika Layzell 79ad077a6a Bug 1699721 - Part 3: Add test for switching back into unloading process, r=kmag
This was somewhat convoluted to get to both reliably reproduce and not timeout
after the fixes were applied. The test can't run without Fission, as it
requires a process switch to occur on the navigation to/from
http://example.com.

Without part 2 of this patch stack, this test will crash after the process
switch.

Differential Revision: https://phabricator.services.mozilla.com/D110003
2021-03-31 16:51:59 +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
Nika Layzell 6959ab57ac Bug 1699721 - Part 1: Fully remove LegacyCheckOnlyOwningProcess, r=kmag
This is necessary as in part 2 the InFlightProcessId value will no longer be
tracked, so any remaining code which depends on it needs to be removed.

Differential Revision: https://phabricator.services.mozilla.com/D110001
2021-03-31 16:51:58 +00:00
Andreea Pavel 4674e1b5e2 Backed out changeset 27d3d97f875f (bug 1696908) build bustage at nsFocusManager.cpp on a CLOSED TREE 2021-03-31 19:32:11 +03: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 f65b0188c7 Bug 1699721 - Part 3: Add test for switching back into unloading process, r=kmag
This was somewhat convoluted to get to both reliably reproduce and not timeout
after the fixes were applied. The test can't run without Fission, as it
requires a process switch to occur on the navigation to/from
http://example.com.

Without part 2 of this patch stack, this test will crash after the process
switch.

Differential Revision: https://phabricator.services.mozilla.com/D110003
2021-03-31 15:37:49 +00: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
Nika Layzell dc0e1921c5 Bug 1699721 - Part 1: Fully remove LegacyCheckOnlyOwningProcess, r=kmag
This is necessary as in part 2 the InFlightProcessId value will no longer be
tracked, so any remaining code which depends on it needs to be removed.

Differential Revision: https://phabricator.services.mozilla.com/D110001
2021-03-31 15:37:48 +00:00
Henri Sivonen 64b6a0c73b Bug 1696908 - Ensure parent-managed order of setting the focused browsing context. r=nika
Differential Revision: https://phabricator.services.mozilla.com/D98134
2021-03-31 14:56:48 +00:00
Olli Pettay 1c8586cc51 Bug 1689683 - Ensure docshell/test/mochitest/test_bug590573.html works with SHIP-BFCache, r=annyG
Better to use requestAnimationFrame to ensure the scrolling actually has occurred after popstate.

Differential Revision: https://phabricator.services.mozilla.com/D109975
2021-03-31 13:17:21 +00:00
Emilio Cobos Álvarez 168b2347b3 Bug 1700871 - Only allow focus move for links / form submission iff actually handling user input. r=smaug
The other navigation that allows focus moves (window.open) already goes
through the popup blocker, so that one is fine.

I think given how weird yet conservative other browsers are, this should
be a good trade-off to avoid false positives.

Differential Revision: https://phabricator.services.mozilla.com/D110196
2021-03-31 01:51:46 +00:00
Cosmin Sabou 128f4975a7 Backed out changeset 8df311a9bec0 (bug 1689683) for causing Bug 1701959. 2021-03-30 18:45:19 +03:00
Olli Pettay 07ba2fd435 Bug 1689686 - Ensure docshell/test/navigation/test_bug1326251.html works with SHIP-BFCache, r=peterv
Differential Revision: https://phabricator.services.mozilla.com/D109945
2021-03-30 09:27:04 +00:00
Olli Pettay 0c43e7ec41 Bug 1689663 - Don't try to run docshell/test/navigation/test_bug1364364.html with SHIP-BFCache, r=peterv
I think this particular test doesn't make much sense in the new implementation.

Differential Revision: https://phabricator.services.mozilla.com/D109961
2021-03-30 09:25:41 +00:00
Olli Pettay 8f15f68443 Bug 1689669 - Ensure docshell/test/mochitest/test_bug1121701.html works with SHIP-BFCache, r=peterv
Depends on D109146

Differential Revision: https://phabricator.services.mozilla.com/D109886
2021-03-30 09:24:45 +00:00
Olli Pettay 1e523ef169 Bug 1699534 - Ensure beforeunload is called when the next page is coming from bfcache, r=peterv
Differential Revision: https://phabricator.services.mozilla.com/D109146
2021-03-30 09:24:45 +00:00
Olli Pettay 2fab9ccddd Bug 1689683 - Ensure docshell/test/mochitest/test_bug590573.html works with SHIP-BFCache, r=annyG
Depends on D109756

Differential Revision: https://phabricator.services.mozilla.com/D109975
2021-03-29 14:38:18 +00:00
Olli Pettay cc185f2b74 Bug 1689685 - Ensure docshell/test/navigation/test_scrollRestoration.html works with SHIP-BFCache, r=peterv
Similarly to the old session history implementation, scroll position needs to be stored in HandleSameDocumentNavigation.
The relevant old implementation is couple of lines above the new code in nsDocShell.

Differential Revision: https://phabricator.services.mozilla.com/D109756
2021-03-29 14:38:18 +00:00
lyavor 0eda688c65 Bug 1694932 - Https-only mode reloads the page in certain cases when there should be just a fragment navigation r=ckerschb,smaug
Differential Revision: https://phabricator.services.mozilla.com/D107999
2021-03-29 12:56:33 +00:00
Olli Pettay 39c56ee58a Bug 1689684 - Ensure docshell/test/browser/browser_bug1347823.js works with SHIP-BFCache, r=peterv
Depends on D109312

Differential Revision: https://phabricator.services.mozilla.com/D109313
2021-03-26 19:15:02 +00:00
Olli Pettay 7da30119f6 Bug 1689664 - Ensure docshell/test/navigation/test_performance_navigation.html works with SHIP-BFCache, r=peterv
This is similar pref enabling as what landed to couple of other tests already
https://searchfox.org/mozilla-central/search?q=%2F%2F+If+Fission+is+disabled%2C+the+pref+is+no-op.&path=

Differential Revision: https://phabricator.services.mozilla.com/D109312
2021-03-26 19:15:01 +00:00
Kashav Madan 5c37b3d6b9 Bug 1700719 - Discard-check all ancestors before restoring, r=nika
Differential Revision: https://phabricator.services.mozilla.com/D109722
2021-03-26 16:24:47 +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
Andreas Farre a9991cb1dc Bug 1572084 - Part 1: Add enhanced Browsing Context traversal. r=nika
Make it possible to skip sub-trees in traversals, and abort traversals
entirely.

Differential Revision: https://phabricator.services.mozilla.com/D107813
2021-03-26 08:59:33 +00:00
Kris Maglione 5db2bf4bdb Bug 1581859: Part 3b - Update existing GetPropertyAsInterface callers to use typesafe do_GetProperty instead. r=mccr8,necko-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D103211
2021-03-25 19:47:02 +00:00
Kris Maglione 301532bc94 Bug 1581859: Part 2b - Add LOAD_FLAGS_IS_REFRESH to all navigations triggered by meta refreshes. r=nika
The extension framework needs to set specific flags on navigations triggered
by meta refresh headers. Adding this to the load type of all navigations
triggered by meta refreshes allows it to do this without tracking docshells on
which refreshes are attempted so that it can make inferences.

Differential Revision: https://phabricator.services.mozilla.com/D108726
2021-03-25 19:47:01 +00:00
Kris Maglione 8eff81f606 Bug 1581859: Part 2a - Add LOCATION_CHANGE_HASHCHANGE onLocationChange flag. r=nika
The naming scheme references the hashchange event. This is required by the
extensions framework to call the appropriate navigation listeners when only
the reference fragment is updated by a navigation.

Differential Revision: https://phabricator.services.mozilla.com/D108725
2021-03-25 19:47:00 +00:00
smolnar 40ea4a43d4 Backed out changeset 51fc422f096f (bug 1700719) for causing browser-chrome failures in CanonicalBrowsingContext. CLOSED TREE 2021-03-25 20:54:18 +02:00
Bogdan Tara b1afbfca15 Backed out 2 changesets (bug 1689684, bug 1689664) for assertion failure at nsSHistory.cpp on fission CLOSED TREE
Backed out changeset 506586ec7b20 (bug 1689684)
Backed out changeset f7c03240d0cc (bug 1689664)
2021-03-25 19:34:47 +02: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
Olli Pettay 88fe366ee5 Bug 1689684 - Ensure docshell/test/browser/browser_bug1347823.js works with SHIP-BFCache, r=peterv
Depends on D109312

Differential Revision: https://phabricator.services.mozilla.com/D109313
2021-03-25 16:40:50 +00:00
Olli Pettay 7188660617 Bug 1689664 - Ensure docshell/test/navigation/test_performance_navigation.html works with SHIP-BFCache, r=peterv
This is similar pref enabling as what landed to couple of other tests already
https://searchfox.org/mozilla-central/search?q=%2F%2F+If+Fission+is+disabled%2C+the+pref+is+no-op.&path=

Differential Revision: https://phabricator.services.mozilla.com/D109312
2021-03-25 16:40:50 +00:00
Kashav Madan a69f8cc71b Bug 1700719 - Discard-check both the top-level and current context before restoring, r=nika
Differential Revision: https://phabricator.services.mozilla.com/D109722
2021-03-25 15:59:50 +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
Andreas Farre a0d3aba220 Bug 1572084 - Part 1: Add enhanced Browsing Context traversal. r=nika
Make it possible to skip sub-trees in traversals, and abort traversals
entirely.

Differential Revision: https://phabricator.services.mozilla.com/D107813
2021-03-25 15:36:37 +00:00
Simon Giesecke 4f0b94ee34 Bug 708901 - Migrate to nsTHashSet in docshell. r=smaug,geckoview-reviewers,aklotz
Differential Revision: https://phabricator.services.mozilla.com/D108591
2021-03-25 08:04:20 +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 613e20d136 Bug 1184468 - Use nsBaseHashtable::Values. r=xpcom-reviewers,nika
Differential Revision: https://phabricator.services.mozilla.com/D108587
2021-03-24 17:56:49 +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 6ba9da592e Bug 708901 - Migrate to nsTHashSet in docshell. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D108591
2021-03-24 16:58:57 +00:00
ankur 32bf182577 Bug 1695253 - Replaced DTD/xhtml1-strict.dtd which lead to broken network loads. r=mossop
Differential Revision: https://phabricator.services.mozilla.com/D109379
2021-03-24 16:52:06 +00:00
Nika Layzell fa0ba706bb Bug 1699626 - Downgrade mWindowGlobalChild to a weak pointer, r=smaug
Theoretically this change shouldn't be necessary, however frequent
intermittents suggest that there are still cases where holding a strong
reference here can lead to memory leaks.

Differential Revision: https://phabricator.services.mozilla.com/D109445
2021-03-24 14:11:49 +00:00
Csoregi Natalia 024e0b2323 Backed out 10 changesets (bug 1581859) for causing hazard failures. CLOSED TREE
Backed out changeset 93fe6801a5e2 (bug 1581859)
Backed out changeset 0a33cb185fb3 (bug 1581859)
Backed out changeset 9ceaad6dab5b (bug 1581859)
Backed out changeset ee611f0839ca (bug 1581859)
Backed out changeset 4199963fe477 (bug 1581859)
Backed out changeset b4c5ace21b9e (bug 1581859)
Backed out changeset 6003469dc449 (bug 1581859)
Backed out changeset 826c62b783c0 (bug 1581859)
Backed out changeset e1d7851295fd (bug 1581859)
Backed out changeset 9796577af27a (bug 1581859)
2021-03-24 08:48:00 +02:00
Kris Maglione 6e2223e151 Bug 1581859: Part 3b - Update existing GetPropertyAsInterface callers to use typesafe do_GetProperty instead. r=mccr8,necko-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D103211
2021-03-23 23:57:11 +00:00
Kris Maglione 94b544ff0f Bug 1581859: Part 2b - Add LOAD_FLAGS_IS_REFRESH to all navigations triggered by meta refreshes. r=nika
The extension framework needs to set specific flags on navigations triggered
by meta refresh headers. Adding this to the load type of all navigations
triggered by meta refreshes allows it to do this without tracking docshells on
which refreshes are attempted so that it can make inferences.

Differential Revision: https://phabricator.services.mozilla.com/D108726
2021-03-23 23:57:10 +00:00
Kris Maglione 18ffa4a411 Bug 1581859: Part 2a - Add LOCATION_CHANGE_HASHCHANGE onLocationChange flag. r=nika
The naming scheme references the hashchange event. This is required by the
extensions framework to call the appropriate navigation listeners when only
the reference fragment is updated by a navigation.

Differential Revision: https://phabricator.services.mozilla.com/D108725
2021-03-23 23:57:10 +00:00
Anny Gakhokidze eb737dfce2 Bug 1698104 - Fix session restore for about:reader, r=nika,kashav
Implement an observer to wait for correct window events in order to restore tab
content.  Non-SHIP code restores about:reader scroll position after receiving
"AboutReaderContentReady" event, so to achieve the same thing with session
history in parent enabled, we can wait for "AboutReader:Ready" event.

Differential Revision: https://phabricator.services.mozilla.com/D108712
2021-03-23 18:01:23 +00:00
Kashav Madan 6d6c056ad0 Bug 1698878 - Verify formdata URL in the parent, r=nika
This should happen before any data is sent down to the content process.

Differential Revision: https://phabricator.services.mozilla.com/D108830
2021-03-23 18:01:22 +00:00
Kashav Madan 5dc7379641 Bug 1597499 - Make Session Restore work in Fission, r=nika
Differential Revision: https://phabricator.services.mozilla.com/D107883
2021-03-23 18:01:21 +00:00
Kashav Madan c91bbe8c6d Bug 1597499 - Move nsIDocShell::ChildOffset to BrowsingContext, r=nika
Differential Revision: https://phabricator.services.mozilla.com/D89969
2021-03-23 18:01:20 +00:00
Henri Sivonen b98488aa92 Bug 673087 - Honor encoding declared via XML declaration in text/html. r=emk
Differential Revision: https://phabricator.services.mozilla.com/D107806
2021-03-23 09:52:04 +00:00
Cosmin Sabou 7eba371387 Backed out 10 changesets (bug 1581859) for causing hazard failures on ExtensionsParent.cpp.
Backed out changeset 6020ec7d7f32 (bug 1581859)
Backed out changeset 07901e457839 (bug 1581859)
Backed out changeset e23389fc98b5 (bug 1581859)
Backed out changeset 4287eebc2c77 (bug 1581859)
Backed out changeset eeff6f501cfc (bug 1581859)
Backed out changeset 22db36f7d16d (bug 1581859)
Backed out changeset 16831d45d0ed (bug 1581859)
Backed out changeset 816643de7694 (bug 1581859)
Backed out changeset 6fd5aa7895e3 (bug 1581859)
Backed out changeset 2b68d2eee18e (bug 1581859)
2021-03-23 05:48:27 +02:00
Kris Maglione 2c7c5a81f0 Bug 1581859: Part 3b - Update existing GetPropertyAsInterface callers to use typesafe do_GetProperty instead. r=mccr8,necko-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D103211
2021-03-22 20:12:16 +00:00
Kris Maglione 1095dd88b9 Bug 1581859: Part 2b - Add LOAD_FLAGS_IS_REFRESH to all navigations triggered by meta refreshes. r=nika
The extension framework needs to set specific flags on navigations triggered
by meta refresh headers. Adding this to the load type of all navigations
triggered by meta refreshes allows it to do this without tracking docshells on
which refreshes are attempted so that it can make inferences.

Differential Revision: https://phabricator.services.mozilla.com/D108726
2021-03-22 20:12:15 +00:00
Kris Maglione 799be479c7 Bug 1581859: Part 2a - Add LOCATION_CHANGE_HASHCHANGE onLocationChange flag. r=nika
The naming scheme references the hashchange event. This is required by the
extensions framework to call the appropriate navigation listeners when only
the reference fragment is updated by a navigation.

Differential Revision: https://phabricator.services.mozilla.com/D108725
2021-03-22 20:12:14 +00:00
Nika Layzell 79390b28ce Bug 1699003 - Simplify initial about:blank detection in SetCurrentURI, r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D109110
2021-03-22 18:06:49 +00:00
Olli Pettay dc39236b97 Bug 1699484 - Support Timer based bfcache eviction, r=peterv
The patch makes HistoryTracker rely on SHEntrySharedParentState instead of nsSHEntryShared.
nsSHEntryShared already extends SHEntrySharedParentState.

The test was modified a tiny bit to make it easier to see the results. The test does pass
with SHIP+BFCache.

Depends on D108851

Differential Revision: https://phabricator.services.mozilla.com/D108984
2021-03-21 21:46:26 +00:00
Olli Pettay b535d5b970 Bug 1698663 - Make Document::RemoveFromBFCacheSync() work with SHIP+BFCache, r=peterv
Depends on D108487

Differential Revision: https://phabricator.services.mozilla.com/D108851
2021-03-21 21:46:25 +00:00
Olli Pettay dd5347ded5 Bug 1698549 - Call FireDelayedDOMEvents when restoring a bfcached page, r=peterv
The test isn't testing anything mApplicationCache related, since appcache is basically
no-op code.

Depends on D107930

Differential Revision: https://phabricator.services.mozilla.com/D108487
2021-03-21 21:46:25 +00:00
Olli Pettay dc0a4c5e6c Bug 1697564 - Suspend/resume refresh URI list when bfcache lives in the parent process, r=peterv
The old setup is a tad fragile since it relies on Stop to happen at a particular moment.

The name RefreshURIToQueue is just trying to be consistent with RefreshURIFromQueue

Differential Revision: https://phabricator.services.mozilla.com/D107930
2021-03-21 21:46:25 +00:00
Olli Pettay 562c3c69fc Bug 1689681 - Ensure docshell/test/navigation/browser_test_bfcache_eviction.js works with SHIP-BFCache r=nika
Depends on D109217

Differential Revision: https://phabricator.services.mozilla.com/D109218
2021-03-21 19:40:50 +00:00
Olli Pettay 9ab5459e29 Bug 1699941 - Ensure docshell/test/navigation/test_bug1379762.html works with SHIP-BFCache r=nika
Depends on D109216

Differential Revision: https://phabricator.services.mozilla.com/D109217
2021-03-21 19:40:50 +00:00
Olli Pettay b4643136c9 Bug 1689672 - Ensure docshell/test/mochitest/test_bug660404.html works with SHIP-BFCache r=nika
Depends on D109212

Differential Revision: https://phabricator.services.mozilla.com/D109213
2021-03-21 19:40:48 +00:00
Olli Pettay 1f324316d5 Bug 1687738 - Re-enable docshell/test/mochitest/test_bfcache_plus_hash.html for Fission r=nika
Differential Revision: https://phabricator.services.mozilla.com/D109212
2021-03-20 23:57:39 +00:00
Mark Banner e8d532d179 Bug 1699747 - Clean up old references to nsIDocShellLoadInfo. r=nika
Differential Revision: https://phabricator.services.mozilla.com/D109095
2021-03-19 18:38:32 +00:00
Nika Layzell d14469fe31 Bug 1675820 - Part 7: Fix marionette BrowsingContext replace detection logic, r=whimboo,marionette-reviewers,farre
Differential Revision: https://phabricator.services.mozilla.com/D108866
2021-03-18 19:24:51 +00:00
Nika Layzell c733984c4b Bug 1675820 - Part 6: Make DocGroup cycle-collected, r=farre,smaug
Previously, the DocGroup type was not cycle-collected, as it needed to have
references from other threads for Quantum DOM. Nowadays the only off-main-thread
use of DocGroup is for dispatching runnables to the main thread which should be
tracked using a performance counter for about:performance. This means we can
remove the DocGroup references from these dispatching callsites, only storing
the Performance Counter we're interested in, and simplify make DocGroup be
cycle-collected itself.

This fixes a leak caused by adding the WindowGlobalChild getter to
WindowContext, by allowing cycles between the document and its BrowsingContext
to be broken by the cycle-collector.

Differential Revision: https://phabricator.services.mozilla.com/D108865
2021-03-18 19:24:50 +00:00
Nika Layzell 3365f956a4 Bug 1675820 - Part 5: Keep BCGs alive while waiting for WindowContext discards to be acked, r=kmag
This should further reduce the chance that a BrowsingContextGroup is mentioned
in a message which has already ben destroyed by a remote process.

Differential Revision: https://phabricator.services.mozilla.com/D108121
2021-03-18 19:24:50 +00:00
Nika Layzell 0f7f0e91a0 Bug 1675820 - Part 4: Track WindowGlobalChild in WindowContext, r=kmag
This allows for the WindowGlobalChild getter in WindowContext to be acquired
more efficiently without performing hashtable lookups, and should generally
simplify things.

The patch also removes the unnecessary XRE_IsContentProcess assertions, and
removes the global hashtable for tracking WindowGlobalChild instances which is
no longer necessary.

Differential Revision: https://phabricator.services.mozilla.com/D108120
2021-03-18 19:24:50 +00:00
Nika Layzell 51907e2d1f Bug 1675820 - Part 1: Upgrade destroyed asserts in BrowsingContextGroup, r=kmag
The issues with BrowsingContextGroup identity may be related to using a
destroyed BrowsingContextGroup in some situations when we shouldn't be. By
upgrading the intensity of these assertions, we should be able to catch the
issues more readily.

Differential Revision: https://phabricator.services.mozilla.com/D108117
2021-03-18 19:24:48 +00:00
Eden Chuang 888442c1d8 Bug 1691153 - mochitest for testing Blob URL data is transmitted with correct principal type. r=asuth
Differential Revision: https://phabricator.services.mozilla.com/D106919
2021-03-18 18:04:43 +00:00
Nika Layzell 8064f7baf7 Bug 1697927 - Part 2: Remove dead CreatedDynamically field, r=farre
Differential Revision: https://phabricator.services.mozilla.com/D108861
2021-03-18 16:15:17 +00:00
smolnar 200bfc652c Backed out 4 changesets (bug 1597499) for causing Fission crashes (bug 1699349). a=backout
Backed out changeset 0df7b8660446 (bug 1597499)
Backed out changeset d015ba9097c5 (bug 1597499)
Backed out changeset e84054ccadb0 (bug 1597499)
Backed out changeset 12762a25c4fa (bug 1597499)
2021-03-18 11:29:08 +02:00
Narcis Beleuzu ffb77b2d9a Backed out 9 changesets (bug 1581859) for bustages jsapi.h . CLOSED TREE
Backed out changeset 2a3a77ae1eae (bug 1581859)
Backed out changeset 181c3f29f222 (bug 1581859)
Backed out changeset f7c39feb502e (bug 1581859)
Backed out changeset 9c7d0015c616 (bug 1581859)
Backed out changeset d2b8ee78745d (bug 1581859)
Backed out changeset 92359266d420 (bug 1581859)
Backed out changeset 98ba6b96c900 (bug 1581859)
Backed out changeset 0eb043b5c904 (bug 1581859)
Backed out changeset 55a4c2fc561d (bug 1581859)
2021-03-18 08:26:57 +02:00
Kris Maglione 82fc76ce55 Bug 1581859: Part 3b - Update existing GetPropertyAsInterface callers to use typesafe do_GetProperty instead. r=mccr8,necko-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D103211
2021-03-18 05:51:06 +00:00
Kris Maglione 6f0d80b656 Bug 1581859: Part 2b - Add LOAD_FLAGS_IS_REFRESH to all navigations triggered by meta refreshes. r=nika
The extension framework needs to set specific flags on navigations triggered
by meta refresh headers. Adding this to the load type of all navigations
triggered by meta refreshes allows it to do this without tracking docshells on
which refreshes are attempted so that it can make inferences.

Differential Revision: https://phabricator.services.mozilla.com/D108726
2021-03-18 05:51:06 +00:00
Kris Maglione 6410970b1e Bug 1581859: Part 2a - Add LOCATION_CHANGE_HASHCHANGE onLocationChange flag. r=nika
The naming scheme references the hashchange event. This is required by the
extensions framework to call the appropriate navigation listeners when only
the reference fragment is updated by a navigation.

Differential Revision: https://phabricator.services.mozilla.com/D108725
2021-03-18 05:51:05 +00:00
Kashav Madan 83da101af6 Bug 1597499 - Make Session Restore work in Fission, r=nika
Differential Revision: https://phabricator.services.mozilla.com/D107883
2021-03-17 16:43:05 +00:00
Kashav Madan 1f5d10dfba Bug 1597499 - Move nsIDocShell::ChildOffset to BrowsingContext, r=nika
Differential Revision: https://phabricator.services.mozilla.com/D89969
2021-03-17 16:43:04 +00:00