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

50 Коммитов

Автор SHA1 Сообщение Дата
Nika Layzell 771fc6dd18 Bug 1615480 - Part 3: Rename nsFrameLoader::mBrowsingContext to avoid confusion, r=kmag
The new name should make it more clear that this should not be the default way
to look up the BrowsingContext instance from a nsFrameLoader, as it does not
ensure that the BrowsingContext has been fully initialized and attached to the
tree.

Differential Revision: https://phabricator.services.mozilla.com/D62959

--HG--
extra : moz-landing-system : lando
2020-02-21 21:53:33 +00:00
Nika Layzell 04b9498a12 Bug 1615480 - Part 1: Return a raw pointer from Get[Extant]BrowsingContext, r=kmag
The BrowsingContext is guaranteed to be being kept alive by
`nsFrameLoader::mBrowsingContext` and by the nsDocShell or RemoteBrowser object.
This improves the ergonomics of this helper method, which may help avoid misuse
of `mBrowsingContext`.

Differential Revision: https://phabricator.services.mozilla.com/D62957

--HG--
extra : moz-landing-system : lando
2020-02-21 21:03:54 +00:00
Cosmin Sabou 887b32be68 Backed out 3 changesets (bug 1615480) for causing build bustages on nsFrameLoader.cpp.
CLOSED TREE

Backed out changeset d6fd08e3fccf (bug 1615480)
Backed out changeset ad31eae54af2 (bug 1615480)
Backed out changeset 70aff2593d98 (bug 1615480)
2020-02-21 23:00:55 +02:00
Nika Layzell bab25b308b Bug 1615480 - Part 3: Rename nsFrameLoader::mBrowsingContext to avoid confusion, r=kmag
The new name should make it more clear that this should not be the default way
to look up the BrowsingContext instance from a nsFrameLoader, as it does not
ensure that the BrowsingContext has been fully initialized and attached to the
tree.

Differential Revision: https://phabricator.services.mozilla.com/D62959

--HG--
extra : moz-landing-system : lando
2020-02-21 18:46:38 +00:00
Nika Layzell df715e383d Bug 1615480 - Part 1: Return a raw pointer from Get[Extant]BrowsingContext, r=kmag
The BrowsingContext is guaranteed to be being kept alive by
`nsFrameLoader::mBrowsingContext` and by the nsDocShell or RemoteBrowser object.
This improves the ergonomics of this helper method, which may help avoid misuse
of `mBrowsingContext`.

Differential Revision: https://phabricator.services.mozilla.com/D62957

--HG--
extra : moz-landing-system : lando
2020-02-21 18:44:57 +00:00
Kris Maglione 1722817403 Bug 1582832: Part 1 - Make FrameLoader owner rather than DocShell responsible for discarding a BC. r=nika
There are all sorts of lifecycle issues which arise from making DocShell
responsible for discarding BrowsingContexts. In this particular bug, we tend
to run into them in cases where we create a BrowsingContext for a FrameLoader,
and then never create a DocShell for it, leading to it never being destroyed.
But there are myriad other issues as well.

This patch moves the responsibility for BrowsingContext lifecycle management
to the FrameLoader/FrameLoaderOwner, rather than the DocShell, which makes
things more consistent, and more closely aligns with spec-defined behavior.

Differential Revision: https://phabricator.services.mozilla.com/D59008

--HG--
extra : moz-landing-system : lando
2020-02-06 19:07:56 +00:00
Daniel Holbert 2c97fdeda5 Bug 1613206: Remove possibly-ignored-by-the-compiler MOZ_ASSERT(this) from nsFrameLoaderOwner.cpp, to address -Wundefined-bool-conversion build warning. r=nika
Differential Revision: https://phabricator.services.mozilla.com/D61621

--HG--
extra : moz-landing-system : lando
2020-02-04 19:45:12 +00:00
Matt Woodrow 4c52496f39 Bug 1603196 - Skip START_STOP notifications from old process being delivered to RemoteWebProgress when process switching during a load. r=kmag,nika
This doesn't block the STATE_START notification from the new process, as we currently have a second start notification (when DocumentChannel redirects to the real channel), so this is unchanged.

Differential Revision: https://phabricator.services.mozilla.com/D56818

--HG--
extra : moz-landing-system : lando
2020-01-09 22:31:40 +00:00
Nika Layzell 2f4515047c Bug 1589054 - Part 4: Run DisplayLoadError in a script runner, r=farre
Differential Revision: https://phabricator.services.mozilla.com/D50025

--HG--
extra : moz-landing-system : lando
2019-10-22 13:57:01 +00:00
Nika Layzell bc9c3bb08c Bug 1589054 - Part 2: Delay pagehide events until new nsFrameLoader is set up, r=farre
If these are fired too early, a nested event loop can be spun before the new
nsFrameLoader has been set up. Messages can be received over the
BrowserBridgeChild actor during this time when no nsFrameLoader is set, causing
crashes.

Differential Revision: https://phabricator.services.mozilla.com/D49647

--HG--
extra : moz-landing-system : lando
2019-10-22 13:57:00 +00:00
Nika Layzell a3cad4162e Bug 1589054 - Part 1: Cleanly kill BrowserBridgeChild if process switch fails, r=farre
Differential Revision: https://phabricator.services.mozilla.com/D49464

--HG--
extra : moz-landing-system : lando
2019-10-22 13:57:00 +00:00
Cosmin Sabou cce21ffe59 Backed out 3 changesets (bug 1589054) for browser chrome failures on browser_crash_oopiframe.js CLOSED TREE
Backed out changeset 1a43032819e1 (bug 1589054)
Backed out changeset 91e4d5c6422a (bug 1589054)
Backed out changeset 03bc24aa3a2c (bug 1589054)
2019-10-21 19:29:20 +03:00
Nika Layzell d50147fcd6 Bug 1589054 - Part 2: Delay pagehide events until new nsFrameLoader is set up, r=farre
If these are fired too early, a nested event loop can be spun before the new
nsFrameLoader has been set up. Messages can be received over the
BrowserBridgeChild actor during this time when no nsFrameLoader is set, causing
crashes.

Differential Revision: https://phabricator.services.mozilla.com/D49647

--HG--
extra : moz-landing-system : lando
2019-10-21 14:03:38 +00:00
Nika Layzell a73568ddeb Bug 1589054 - Part 1: Cleanly kill BrowserBridgeChild if process switch fails, r=farre
Differential Revision: https://phabricator.services.mozilla.com/D49464

--HG--
extra : moz-landing-system : lando
2019-10-21 14:03:36 +00:00
Nika Layzell 965f006a70 Bug 1576714 - Part 3: Initiate subframe process switches from the parent, r=kmag
This flips the direction in which the BrowserBridge actor is generally created
such that it is generally created in the parent and sent down to a child
process.

This is done by making the decision about what kind of switch to perform in the
parent, and sending messages down to child processes async to orchestrate these
process changes.

Process launching is changed to use an async `MozPromise`-returning API in this
patch, though the actual process launching still occurs synchronously. A future
patch will enable performing async process launching through the
NewOrUsedBrowserProcess mechanism.

I know of at least a few timing issues which exist with the new logic,
especially around the state of the BrowsingContext during the process
transition. I decided to not try to fix all of these issues in this patch, as
many are complex and will require changing how we manage the lifecycle of
BrowsingContext substantially. I do, however, think that the new logic is more
reliable and has fewer timing issues than the previous logic.

Differential Revision: https://phabricator.services.mozilla.com/D47310

--HG--
extra : moz-landing-system : lando
2019-10-15 16:19:16 +00:00
Sylvestre Ledru f12b9fa5c3 Bug 1519636 - Reformat recent changes to the Google coding style r=Ehsan
# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D47737

--HG--
extra : moz-landing-system : lando
2019-10-06 18:29:55 +00:00
Csoregi Natalia 8768a4f5e3 Backed out 7 changesets (bug 1576714) for fission permafailures on test_bug590812.html. a=backout
Backed out changeset d0c49f00eb91 (bug 1576714)
Backed out changeset faecc9f35b49 (bug 1576714)
Backed out changeset 2e156655c31e (bug 1576714)
Backed out changeset eece722082c7 (bug 1576714)
Backed out changeset ebda40f96884 (bug 1576714)
Backed out changeset 7dce423417d8 (bug 1576714)
Backed out changeset 9a5072019168 (bug 1576714)
2019-10-05 00:08:33 +03:00
Nika Layzell 89b22d83ef Bug 1576714 - Part 3: Initiate subframe process switches from the parent, r=kmag
This flips the direction in which the BrowserBridge actor is generally created
such that it is generally created in the parent and sent down to a child
process.

This is done by making the decision about what kind of switch to perform in the
parent, and sending messages down to child processes async to orchestrate these
process changes.

Process launching is changed to use an async `MozPromise`-returning API in this
patch, though the actual process launching still occurs synchronously. A future
patch will enable performing async process launching through the
NewOrUsedBrowserProcess mechanism.

I know of at least a few timing issues which exist with the new logic,
especially around the state of the BrowsingContext during the process
transition. I decided to not try to fix all of these issues in this patch, as
many are complex and will require changing how we manage the lifecycle of
BrowsingContext substantially. I do, however, think that the new logic is more
reliable and has fewer timing issues than the previous logic.

Differential Revision: https://phabricator.services.mozilla.com/D47310

--HG--
extra : moz-landing-system : lando
2019-10-03 21:40:24 +00:00
Brindusan Cristian 950e03660b Backed out 6 changesets (bug 1576714) for build bustages at nsFrameLoaderOwner.cpp. CLOSED TREE
Backed out changeset 083967e704d2 (bug 1576714)
Backed out changeset b3467f1bdde7 (bug 1576714)
Backed out changeset 88e3b4b7fbaf (bug 1576714)
Backed out changeset b91221da32c7 (bug 1576714)
Backed out changeset 6996b7705f06 (bug 1576714)
Backed out changeset a303fc193f60 (bug 1576714)
2019-10-02 04:14:53 +03:00
Nika Layzell f55d088ec3 Bug 1576714 - Part 3: Initiate subframe process switches from the parent, r=kmag
This flips the direction in which the BrowserBridge actor is generally created
such that it is generally created in the parent and sent down to a child
process.

This is done by making the decision about what kind of switch to perform in the
parent, and sending messages down to child processes async to orchestrate these
process changes.

Process launching is changed to use an async `MozPromise`-returning API in this
patch, though the actual process launching still occurs synchronously. A future
patch will enable performing async process launching through the
NewOrUsedBrowserProcess mechanism.

I know of at least a few timing issues which exist with the new logic,
especially around the state of the BrowsingContext during the process
transition. I decided to not try to fix all of these issues in this patch, as
many are complex and will require changing how we manage the lifecycle of
BrowsingContext substantially. I do, however, think that the new logic is more
reliable and has fewer timing issues than the previous logic.

Differential Revision: https://phabricator.services.mozilla.com/D47310

--HG--
extra : moz-landing-system : lando
2019-10-01 18:09:03 +00:00
Kris Maglione 847fce5501 Bug 1582523: Part 1 - Actually block document load event during OOP frame loads. r=nika
This fixes both our failure to register load blockers for remote frames and
our failure to keep the load event blocked during frameloader rebuilding on
remoteness change.

Differential Revision: https://phabricator.services.mozilla.com/D46503

--HG--
extra : source : dff7756afe8ede1e03d775ec4999d4807d82c1da
extra : histedit_source : b02eae2b652683ef17be3e0ff6a908b4bec311f5%2Cc62c8e5e4ca066f8f526a81a9aae0feeb84326a5
2019-09-19 11:45:36 -07:00
Matt Woodrow b8226cf581 Bug 1546022 - Activate mouse over state for new BrowserParents. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D44413

--HG--
extra : moz-landing-system : lando
2019-09-18 02:06:32 +00:00
Oana Pop Rus 1f0c49ab12 Backed out changeset 3a49482c8210 (bug 1546022) for build bustage in nsFrameLoaderOwner.cpp on a CLOSED TREE 2019-09-18 04:22:40 +03:00
Matt Woodrow 68f7f6bf05 Bug 1546022 - Activate mouse over state for new BrowserParents. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D44413

--HG--
extra : moz-landing-system : lando
2019-09-17 14:22:40 +00:00
Nika Layzell f103e26834 Bug 1579213 - Remove unused fields from ChangeRemoteness API, r=farre
This patch changes a few things about how nsFrameLoader is created, specifically
around the ChangeRemoteness API.

1. The private 'nsFrameLoader::nsFrameLoader' constructor has been simplified to
   only have one overload, shared by the different `::Create` static methods.

2. The creation static method used by `ChangeRemoteness` has changed name to
   `::Recreate`, as the signature is becoming more like the old method.

3. The `mNetworkCreated` bit is preserved when doing a `ChangeRemoteness`, as a
   remoteness change shouldn't be affecting that property.

4. Unused fields are removed from the ChangeRemoteness API.

5. The `remoteType` attribute is now mandatory in the ChangeRemoteness API,
   which simplifies the logic and makes it harder to accidentally misuse.

Differential Revision: https://phabricator.services.mozilla.com/D44893

--HG--
extra : moz-landing-system : lando
2019-09-11 08:09:58 +00:00
Andreas Farre 6e42fb98f8 Bug 1563619 - Handle subframe crashes in BrowserParent::ActorDestroy. r=mconley,kmag,peterv
Differential Revision: https://phabricator.services.mozilla.com/D40937

--HG--
extra : moz-landing-system : lando
2019-08-26 13:08:32 +00:00
Nicholas Nethercote 18fae65f38 Bug 1563139 - Remove StaticPrefs.h. r=glandium
This requires replacing inclusions of it with inclusions of more specific prefs
files.

The exception is that StaticPrefsAll.h, which is equivalent to StaticPrefs.h,
and is used in `Codegen.py` because doing something smarter is tricky and
suitable for a follow-up. As a result, any change to StaticPrefList.yaml will
still trigger recompilation of all the generated DOM bindings files, but that's
still a big improvement over trigger recompilation of every file that uses
static prefs.

Most of the changes in this commit are very boring. The only changes that are
not boring are modules/libpref/*, Codegen.py, and ServoBindings.toml.

Differential Revision: https://phabricator.services.mozilla.com/D39138

--HG--
extra : moz-landing-system : lando
2019-07-26 01:10:23 +00:00
Nika Layzell f02c5f7c87 Bug 1555753 - Always enable Browsing Context preservation in fission windows, r=farre
Differential Revision: https://phabricator.services.mozilla.com/D33544

--HG--
extra : moz-landing-system : lando
2019-06-10 13:06:46 +00:00
Sylvestre Ledru d57d4905f1 Bug 1519636 - Reformat recent changes to the Google coding style r=Ehsan
# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D30883

--HG--
extra : moz-landing-system : lando
2019-05-25 17:46:15 +00:00
arthur.iakab af8e458c5f Backed out changeset a296439a25ff (bug 1519636) for frequent Windows cppunit failures CLOSED TREE 2019-05-24 14:26:01 +03:00
Sylvestre Ledru c82ea97226 Bug 1519636 - Reformat recent changes to the Google coding style r=Ehsan
# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D30883

--HG--
extra : moz-landing-system : lando
2019-05-24 09:59:17 +00:00
Kyle Machulis 6c8ad68e8a Bug 1540839 - Add pref for preserving browsing contexts; r=nika
Still having lots of issues with tests failing, but need to get this
landed for various reasons. Followup to pref on at Bug 1550571.

Differential Revision: https://phabricator.services.mozilla.com/D30563
2019-05-14 10:51:09 -07:00
Kyle Machulis 6fc5e88d97 Bug 1540839 - Don't reuse BCs on top level windows being made local; r=nika
Don't preserve contexts when we have a chrome window that's being made local.

Differential Revision: https://phabricator.services.mozilla.com/D29044
2019-05-14 10:51:06 -07:00
Kyle Machulis d0cadc6c25 Bug 1540839 - Add Cross Origin Opener Policy case for BC preservation; r=nika
If we're doing a process switch due to the cross origin opener policy
being mismatched, we don't want to preserve the browsing context.

Differential Revision: https://phabricator.services.mozilla.com/D26392
2019-05-14 10:51:05 -07:00
Kyle Machulis 9f9436d028 Bug 1540839 - Add ability to preserve browsing contexts between FrameLoaders; r=nika
When changing processes and therefore destroying/rebuilding
frameloaders, add ability to keep the browsing context around and add
it to the new frameloader.

Differential Revision: https://phabricator.services.mozilla.com/D26267
2019-05-14 10:51:04 -07:00
Razvan Maries 1be8bab7d1 Backed out 8 changesets (bug 1540839) for build bustages. CLOSED TREE
Backed out changeset f7e477858ab7 (bug 1540839)
Backed out changeset 55e841a0f005 (bug 1540839)
Backed out changeset b71b58e40426 (bug 1540839)
Backed out changeset 484a54613358 (bug 1540839)
Backed out changeset b34c4d71f202 (bug 1540839)
Backed out changeset 8ff2ff524489 (bug 1540839)
Backed out changeset 27492a30286c (bug 1540839)
Backed out changeset f1c35e8e84f6 (bug 1540839)
2019-05-14 04:23:27 +03:00
Kyle Machulis 56ad33e48e Bug 1540839 - Add pref for preserving browsing contexts; r=nika
Still having lots of issues with tests failing, but need to get this
landed for various reasons. Followup to pref on at Bug 1550571.

Differential Revision: https://phabricator.services.mozilla.com/D30563
2019-05-13 17:58:46 -07:00
Kyle Machulis 76cb0252a1 Bug 1540839 - Don't reuse BCs on top level windows being made local; r=nika
Don't preserve contexts when we have a chrome window that's being made local.

Differential Revision: https://phabricator.services.mozilla.com/D29044
2019-05-13 17:58:45 -07:00
Kyle Machulis 679ff7a37e Bug 1540839 - Add Cross Origin Opener Policy case for BC preservation; r=nika
If we're doing a process switch due to the cross origin opener policy
being mismatched, we don't want to preserve the browsing context.

Differential Revision: https://phabricator.services.mozilla.com/D26392
2019-05-13 17:58:45 -07:00
Kyle Machulis deebf851e0 Bug 1540839 - Add ability to preserve browsing contexts between FrameLoaders; r=nika
When changing processes and therefore destroying/rebuilding
frameloaders, add ability to keep the browsing context around and add
it to the new frameloader.

Differential Revision: https://phabricator.services.mozilla.com/D26267
2019-05-13 17:58:44 -07:00
Brian Hackett d5333b6d62 Bug 1392408 Part 2 - Encapsulate threadsafe main/worker stacks in WorkerStackHolder, r=bzbarsky.
--HG--
extra : rebase_source : ea846926ba4c7f2caca45d56004644f03bdeeb7f
2019-05-02 08:25:43 -10:00
Emilio Cobos Álvarez ccc940508d Bug 1546019 - When a focused browser changes remoteness, make sure to activate the remote browser if needed. r=qdot
Not quite sure what's a good way to add a test for this... Ideas?

Differential Revision: https://phabricator.services.mozilla.com/D29104

--HG--
extra : moz-landing-system : lando
2019-04-29 20:06:22 +00:00
Nika Layzell bc80781e67 Bug 1539163 - Part 1: support resuming load after process switch, r=qdot
This adds a codepath to the process switching logic to, rather than triggering
a fresh load, resume a process switching load.

Differential Revision: https://phabricator.services.mozilla.com/D27512

--HG--
extra : moz-landing-system : lando
2019-04-17 00:53:28 +00:00
Andreas Farre 29d439a983 Bug 1523636 - Create BrowsingContext in nsFrameLoader. r=nika,qdot
Differential Revision: https://phabricator.services.mozilla.com/D25039

--HG--
extra : moz-landing-system : lando
2019-04-15 15:14:54 +00:00
Nika Layzell 91f0500959 Bug 1542781 - Expose browsingContext on FrameLoaderOwner, r=farre
Differential Revision: https://phabricator.services.mozilla.com/D26548

--HG--
extra : moz-landing-system : lando
2019-04-08 16:27:28 +00:00
Ryan Hunt 8653565c5e Bug 1535390 - Ensure remote browser has dimensions set after recreating frame loader. r=jwatt
nsFrameLoaderOwner::UpdateRemoteness will recreate the nsFrameLoader for a
piece of content. As part of this, it will unset the cached nsFrameLoader for
the content's nsSubdocumentFrame. However we need to run ShowViewer() for the
new nsFrameLoader as the frame has already been initialized. In addition,
dimensions and position on the new nsFrameLoader need to be set. Usually this
is done after a reflow, but there's no guarantee a reflow will happen after
a UpdateRemoteness operation.

Differential Revision: https://phabricator.services.mozilla.com/D25662

--HG--
extra : moz-landing-system : lando
2019-04-05 19:25:30 +00:00
Sylvestre Ledru ef0bfc3822 Bug 1519636 - Reformat recent changes to the Google coding style r=Ehsan
# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D24168

--HG--
extra : moz-landing-system : lando
2019-03-31 15:12:55 +00:00
Kyle Machulis 514400e811 Bug 1522713 - Allow updating of Frameloader Remoteness via FrameLoaderOwner; r=nika
Adds a method for to nsFrameLoaderOwner destroying and rebuilding a
FrameLoader in order to facilitate a process switch. Method works
without requiring that the work be done in the frontend.

Depends on D22789

Differential Revision: https://phabricator.services.mozilla.com/D22790

--HG--
extra : moz-landing-system : lando
2019-03-14 01:25:07 +00:00
Sylvestre Ledru e0c61dafa5 Bug 1519636 - Reformat recent changes to the Google coding style r=Ehsan
Summary: # ignore-this-changeset

Reviewers: Ehsan

Reviewed By: Ehsan

Subscribers: emilio, jandem, bbouvier, jya

Bug #: 1519636

Differential Revision: https://phabricator.services.mozilla.com/D20062
2019-02-16 20:20:37 +01:00
Kyle Machulis 623c5a81b8 Bug 1524683 - Add nsFrameLoaderOwner class; r=nika
Depends on D19727

Differential Revision: https://phabricator.services.mozilla.com/D19728

--HG--
extra : moz-landing-system : lando
2019-02-15 22:20:51 +00:00