Commit Graph

1278 Commits

Author SHA1 Message Date
Kris Maglione
28deb15a56 Bug 1637085: Use AsyncShutdown for ContentParent shutdown. r=nika
Differential Revision: https://phabricator.services.mozilla.com/D74746
2020-06-02 20:46:07 +00:00
Gijs Kruitbosch
728702a673 Bug 1606797 - pass the triggering principal when opening external URIs, r=ckerschb
Differential Revision: https://phabricator.services.mozilla.com/D77027
2020-05-27 12:46:34 +00:00
Csoregi Natalia
2d5cafc841 Backed out 5 changesets (bug 1639833) for failures on browser_blockingIndexedDbInWorkers.js. CLOSED TREE
Backed out changeset 6b4f76d65540 (bug 1639833)
Backed out changeset c77acba1aacb (bug 1639833)
Backed out changeset 30c97666919e (bug 1639833)
Backed out changeset d769b313441a (bug 1639833)
Backed out changeset ed41b41d1b03 (bug 1639833)
2020-06-02 15:02:31 +03:00
Andrea Marchesini
6f2eed62c8 Bug 1639833 - IntrisincStoragePrincipal should always be partitioned - part 4 - Renaming storage access permission methods, r=dimi
Differential Revision: https://phabricator.services.mozilla.com/D76917
2020-06-02 08:30:24 +00:00
Razvan Maries
9b7eb56aa8 Backed out changeset 8f1051f12365 (bug 1637085) for build bustages on selftest.py. CLOSED TREE 2020-06-01 21:52:34 +03:00
Kris Maglione
dd56054fcb Bug 1637085: Use AsyncShutdown for ContentParent shutdown. r=nika
Differential Revision: https://phabricator.services.mozilla.com/D74746
2020-06-01 18:01:13 +00:00
Noemi Erli
f08b043cf6 Backed out 5 changesets (bug 1639833) for causing sessionstorage related failures CLOSED TREE
Backed out changeset b36af8d9db34 (bug 1639833)
Backed out changeset 712c11904dbe (bug 1639833)
Backed out changeset 14f1e4783582 (bug 1639833)
Backed out changeset b7f14c4cfe5d (bug 1639833)
Backed out changeset b4b25034dd83 (bug 1639833)
2020-06-01 19:31:50 +03:00
Andrea Marchesini
a997c1d626 Bug 1639833 - IntrisincStoragePrincipal should always be partitioned - part 4 - Renaming storage access permission methods, r=dimi
Differential Revision: https://phabricator.services.mozilla.com/D76917
2020-06-01 11:59:46 +00:00
Randell Jesup
78facb122a Bug 1602757: add preallocation cache for webIsolated (fission) processes r=nika,smaug
Differential Revision: https://phabricator.services.mozilla.com/D69589
2020-05-30 14:38:30 +00:00
Narcis Beleuzu
4e6564f9f0 Backed out 7 changesets (bug 1602757, bug 1640801, bug 1612063, bug 1569928) for wpt failures on operator-dictionary-spacing-002/003/006.html CLOSED TREE
Backed out changeset 11277f03c48c (bug 1640801)
Backed out changeset 6d2a92d25b8f (bug 1569928)
Backed out changeset 383fd9b931ae (bug 1602757)
Backed out changeset 58ec60831af6 (bug 1602757)
Backed out changeset 4b9c579de3b2 (bug 1602757)
Backed out changeset a34288a6f60c (bug 1612063)
Backed out changeset 5134aaa3278e (bug 1602757)
2020-05-29 05:38:02 +03:00
Randell Jesup
a6b0fd37c6 Bug 1602757: add preallocation cache for webIsolated (fission) processes r=nika,smaug
Differential Revision: https://phabricator.services.mozilla.com/D69589
2020-05-28 21:37:03 +00:00
Narcis Beleuzu
0d860681b7 Backed out 6 changesets (bug 1602757, bug 1612063, bug 1569928) for wpt failure on operator-dictionary-spacing-001.html . CLOSED TREE
Backed out changeset 0f9c7960f36e (bug 1569928)
Backed out changeset 9456c9f960c9 (bug 1602757)
Backed out changeset 8dc7e11dbb9c (bug 1602757)
Backed out changeset 8bacf5ad656e (bug 1602757)
Backed out changeset b15fc1090ac7 (bug 1612063)
Backed out changeset bd19c329c6b7 (bug 1602757)
2020-05-28 21:29:25 +03:00
Randell Jesup
4899b7707e Bug 1602757: add preallocation cache for webIsolated (fission) processes r=nika,smaug
Differential Revision: https://phabricator.services.mozilla.com/D69589
2020-05-28 14:33:24 +00:00
Matt Woodrow
e060a86c42 Bug 1631405 - Move nsISecureBrowserUI to be owned by the canonical browsing context instead of docshell. r=nika,ckerschb,Gijs,webcompat-reviewers,twisniewski
This removes all docshell nsISecureBrowserUI and mixed content properties, and moves them into CanonicalBrowsingContext/WindowGlobalParent. It makes the mixed content blocker just compute the state for the current load, and then send the results to the parent process, where we update the security state accordingly.

I think we could in the future remove onSecurityChange entirely, and instead just fire an event to the <browser> element notifying it of changes to the queryable securityUI.

Unfortunately we have a lot of existing code that depends on specific ordering between onSecurityChange and onLocationChange, so I had to hook into the RemoteWebProgress implementation in BrowserParent to mimic the same timings.

Differential Revision: https://phabricator.services.mozilla.com/D75447
2020-05-27 00:28:59 +00:00
Bogdan Tara
a54ec3073f Backed out 4 changesets (bug 1631405) for multiple mochitest failures CLOSED TREE
Backed out changeset 9963cc0b23cb (bug 1631405)
Backed out changeset 469ac933ed7c (bug 1631405)
Backed out changeset 0c5f55864268 (bug 1631405)
Backed out changeset 20dcbcc2f3b8 (bug 1631405)
2020-05-27 01:30:20 +03:00
Matt Woodrow
240d417eb6 Bug 1631405 - Move nsISecureBrowserUI to be owned by the canonical browsing context instead of docshell. r=nika,ckerschb,Gijs,webcompat-reviewers,twisniewski
This removes all docshell nsISecureBrowserUI and mixed content properties, and moves them into CanonicalBrowsingContext/WindowGlobalParent. It makes the mixed content blocker just compute the state for the current load, and then send the results to the parent process, where we update the security state accordingly.

I think we could in the future remove onSecurityChange entirely, and instead just fire an event to the <browser> element notifying it of changes to the queryable securityUI.

Unfortunately we have a lot of existing code that depends on specific ordering between onSecurityChange and onLocationChange, so I had to hook into the RemoteWebProgress implementation in BrowserParent to mimic the same timings.

Differential Revision: https://phabricator.services.mozilla.com/D75447
2020-05-26 21:17:01 +00:00
Gijs Kruitbosch
38b061ef45 Bug 1638373 - remove js/ipc now that CPOWs are dead, r=mccr8
Depends on D76597

Differential Revision: https://phabricator.services.mozilla.com/D76598
2020-05-24 18:47:04 +00:00
Narcis Beleuzu
34d12babb2 Backed out 5 changesets (bug 1602757, bug 1612063) for marionette failures on test_crash.py
Backed out changeset 232da017dc6a (bug 1602757)
Backed out changeset 32851bed1929 (bug 1602757)
Backed out changeset 1c6a6bfaaeef (bug 1602757)
Backed out changeset 45e22f062bce (bug 1612063)
Backed out changeset a7d7edf158a4 (bug 1602757)
2020-05-23 23:45:59 +03:00
Randell Jesup
ec264a9a49 Bug 1602757: add preallocation cache for webIsolated (fission) processes r=nika,smaug
Differential Revision: https://phabricator.services.mozilla.com/D69589
2020-05-23 05:37:26 +00:00
Csoregi Natalia
40b453bd7c Backed out 7 changesets (bug 1602757, bug 1612063) for browser-chrome failures on browser_resource_uri.js. CLOSED TREE
Backed out changeset 2556e3876602 (bug 1602757)
Backed out changeset 1c98ac1c4283 (bug 1602757)
Backed out changeset 2c7bf6206bb4 (bug 1602757)
Backed out changeset a0142f6bb65f (bug 1602757)
Backed out changeset 7f114ce6b98d (bug 1612063)
Backed out changeset d9b4b2cffaa5 (bug 1602757)
Backed out changeset 33515632a7db (bug 1602757)
2020-05-21 04:09:56 +03:00
Randell Jesup
ce46a60d0a Bug 1602757: add preallocation cache for webIsolated (fission) processes r=nika,smaug
Differential Revision: https://phabricator.services.mozilla.com/D69589
2020-05-20 22:38:42 +00:00
Peter Van der Beken
2c8f84716d Bug 1570255 - Forward ChildSHistory::Go to the parent. r=smaug
This enables navigating by index in session history go through the
session history in the parent (if enabled with the pref).

If the pref is enabled, then ChildSHistory::Go will send an IPC message
to the parent with the index to navigate to. The parent calls the
existing nsSHistory implementation and starts the loads, and
asynchronously returns the index that we actually navigated to. The
child process then uses that result to update the session history
implementation in the child process (this part is temporary, while we
have session history both in parent and in child). We also make the
parent send an updated length to the child process over IPC, so that
history.length always the length for the implementation in the parent.

Differential Revision: https://phabricator.services.mozilla.com/D65330
2020-05-20 09:15:31 +00:00
Peter Van der Beken
f38cc0e952 Bug 1570255 - Reboot session history in parent part 1. r=smaug,necko-reviewers,valentin
This adds a new implementation of nsISHEntry
(mozilla::dom::SessionHistoryEntry). When session history in the parent
is turned on, we'll instantiate the existing nsSHistory in the parent
process, but it will store entries of this new type. The nsSHistory in
the child process will also be instantiated for now, to avoid breaking
too many assumptions, and we try to keep parent and child
implementations in sync.

mozilla::dom::SessionHistoryEntry stores most of its data in a new
structure (mozilla::dom::SessionHistoryInfo) which can be sent over IPC.
When a load starts through the DocumentChannel we create an entry of
this new type for it in the parent process in
DocumentLoadListener::Open. The SessionHistoryInfo for that entry (with
an associated ID) is then sent over IPC in the RedirectToRealChannelArgs
to the process that does the actual load, where we store it in the
nsDocShell in mLoadingEntry (and mLoadingEntryId). The parent process
keeps track of outstanding loading entries in an array (mLoadingEntries)
in the CanonicalBrowsingContext. When a load finishes the nsDocShell
transfers mLoadingEntry into mActiveEntry, and notifies the parent
process through an IPC message (HistoryCommit) with the id of that
entry. The CanonicalBrowsingContext then removes the entry from the
array and stores it in its mActiveEntry, and adds the entry to the
nsSHistory object.

There are a number of things in this patch that are broken, and a lot of
FIXME comments. However, with the pref turned off things should just be
working as before. The goal is to land this first part, and then iterate
on the new implementation until we can switch over.

Differential Revision: https://phabricator.services.mozilla.com/D65329
2020-05-20 09:09:12 +00:00
Peter Van der Beken
1990918ebe Bug 1570255 - Remove sync session history implementation. r=smaug,nika
Differential Revision: https://phabricator.services.mozilla.com/D65326
2020-05-20 09:09:06 +00:00
Tom Tung
d9d34b2983 Bug 1605176 - Send a error message data and cause a message error on the receiver side when the message data contains a shared memory object in BrowsingContext::PostMessageMoz; r=baku,kmag
Differential Revision: https://phabricator.services.mozilla.com/D75035
2020-05-20 08:27:16 +00:00
Dorel Luca
fc22d41aeb Backed out changeset 9bedd57840ed (bug 1637085) for WPT failures. CLOSED TREE 2020-05-15 05:37:57 +03:00
Kris Maglione
710c64adb4 Bug 1637085: Use AsyncShutdown for ContentParent shutdown. r=nika
Differential Revision: https://phabricator.services.mozilla.com/D74746
2020-05-13 16:38:11 +00:00
Csoregi Natalia
517e830522 Backed out 4 changesets (bug 1629866, bug 1570255) for assertion failures on DocumentChannelChild.cpp. CLOSED TREE
Backed out changeset 214e4a11be0d (bug 1570255)
Backed out changeset db066dda1bb8 (bug 1570255)
Backed out changeset d9f75d88613e (bug 1570255)
Backed out changeset fe2d4790b73a (bug 1629866)
2020-05-13 18:30:42 +03:00
Gijs Kruitbosch
228e52aebe Bug 1196151 - use BrowsingContext for external helper app handling of protocols, r=mattwoodrow
Differential Revision: https://phabricator.services.mozilla.com/D74434
2020-05-11 13:13:03 +00:00
Peter Van der Beken
c46091ad18 Bug 1570255 - Forward ChildSHistory::Go to the parent. r=smaug
This enables navigating by index in session history go through the
session history in the parent (if enabled with the pref).

If the pref is enabled, then ChildSHistory::Go will send an IPC message
to the parent with the index to navigate to. The parent calls the
existing nsSHistory implementation and starts the loads, and
asynchronously returns the index that we actually navigated to. The
child process then uses that result to update the session history
implementation in the child process (this part is temporary, while we
have session history both in parent and in child). We also make the
parent send an updated length to the child process over IPC, so that
history.length always the length for the implementation in the parent.

Differential Revision: https://phabricator.services.mozilla.com/D65330
2020-05-13 13:47:11 +00:00
Peter Van der Beken
879cba492c Bug 1570255 - Reboot session history in parent part 1. r=smaug,necko-reviewers,valentin
This adds a new implementation of nsISHEntry
(mozilla::dom::SessionHistoryEntry). When session history in the parent
is turned on, we'll instantiate the existing nsSHistory in the parent
process, but it will store entries of this new type. The nsSHistory in
the child process will also be instantiated for now, to avoid breaking
too many assumptions, and we try to keep parent and child
implementations in sync.

mozilla::dom::SessionHistoryEntry stores most of its data in a new
structure (mozilla::dom::SessionHistoryInfo) which can be sent over IPC.
When a load starts through the DocumentChannel we create an entry of
this new type for it in the parent process in
DocumentLoadListener::Open. The SessionHistoryInfo for that entry (with
an associated ID) is then sent over IPC in the RedirectToRealChannelArgs
to the process that does the actual load, where we store it in the
nsDocShell in mLoadingEntry (and mLoadingEntryId). The parent process
keeps track of outstanding loading entries in an array (mLoadingEntries)
in the CanonicalBrowsingContext. When a load finishes the nsDocShell
transfers mLoadingEntry into mActiveEntry, and notifies the parent
process through an IPC message (HistoryCommit) with the id of that
entry. The CanonicalBrowsingContext then removes the entry from the
array and stores it in its mActiveEntry, and adds the entry to the
nsSHistory object.

There are a number of things in this patch that are broken, and a lot of
FIXME comments. However, with the pref turned off things should just be
working as before. The goal is to land this first part, and then iterate
on the new implementation until we can switch over.

Differential Revision: https://phabricator.services.mozilla.com/D65329
2020-05-13 13:46:33 +00:00
Peter Van der Beken
e2a88c491c Bug 1570255 - Remove sync session history implementation. r=smaug,nika
Differential Revision: https://phabricator.services.mozilla.com/D65326
2020-05-13 14:24:55 +00:00
Henri Sivonen
45aad1c320 Bug 1617788 - Restore focus in out-of-focus iframe after switching to another app and back even for non-keyboard causes. r=NeilDeakin
Differential Revision: https://phabricator.services.mozilla.com/D67878
2020-05-08 00:20:51 +00:00
Nika Layzell
dcf520555c Bug 1634530 - Delete unused CheckBrowsingContextOwnership, r=kmag
Differential Revision: https://phabricator.services.mozilla.com/D73339
2020-04-30 19:50:14 +00:00
David Teller
24806e2f1b Bug 1580448 - Add NS_DECL_NSICONTENTPARENT to ContentParent;r=nika
This is a fixup to Bug 1580447, which landed some time ago.

Differential Revision: https://phabricator.services.mozilla.com/D72758
2020-04-30 16:19:55 +00:00
David Teller
3da6e17db2 Bug 1580448 - JSProcessActor API;r=nika
This patch introduces the bulk of JSProcessActor{Child, Parent}.

Differential Revision: https://phabricator.services.mozilla.com/D64595
2020-04-30 16:49:50 +00:00
Stefan Hindli
e22cd35728 Backed out 9 changesets (bug 1580448) for linux build bustages in /builds/worker/workspace/obj-build/dist/include/mozilla/dom/JSWindowActorChild.h CLOSED TREE
Backed out changeset 6b4db1a501df (bug 1580448)
Backed out changeset 677257a41457 (bug 1580448)
Backed out changeset 6db8de5fc125 (bug 1580448)
Backed out changeset fd7527c86239 (bug 1580448)
Backed out changeset bfbd3330b0a5 (bug 1580448)
Backed out changeset dafa80c63322 (bug 1580448)
Backed out changeset 2a1701831a6a (bug 1580448)
Backed out changeset 9b548bd38671 (bug 1580448)
Backed out changeset 358f764ae48b (bug 1580448)
2020-04-30 10:58:27 +03:00
David Teller
024b5f5200 Bug 1580448 - Add NS_DECL_NSICONTENTPARENT to ContentParent;r=nika
This is a fixup to Bug 1580447, which landed some time ago.

Differential Revision: https://phabricator.services.mozilla.com/D72758
2020-04-30 07:36:36 +00:00
David Teller
942da6a70f Bug 1580448 - JSProcessActor API;r=nika
This patch introduces the bulk of JSProcessActor{Child, Parent}.

Differential Revision: https://phabricator.services.mozilla.com/D64595
2020-04-30 07:35:17 +00:00
Dimi Lee
56bfd52246 Bug 1612376 - P6. Permission update in the parent process should only happen when the heurisitc is triggered by a first-party window r=timhuang,baku
Differential Revision: https://phabricator.services.mozilla.com/D72657
2020-04-29 14:48:47 +00:00
alwu
b368e58a84 Bug 1632301 - part4 : rename 'ControlledMediaState' to 'MediaPlaybackState'. r=bryce
This patch will do :
- rename `ControlledMediaState` to `MediaPlaybackState`
- rename the related functions

The advantage of doing so :
- more consistent with `MediaAudibleState`

Differential Revision: https://phabricator.services.mozilla.com/D72060
2020-04-28 07:14:05 +00:00
alwu
d1cbaeb672 Bug 1632301 - part3 : use MediaAudibleState to replace boolean value. r=bryce
This patch will do :
- replace `boolean` with enum class `MediaAudibleState`

The advantage of doing so :
- It's easier to understand what actually meaning of the parameter we set

Differential Revision: https://phabricator.services.mozilla.com/D72058
2020-04-28 07:14:05 +00:00
Steven MacLeod
e34761f02e Bug 1597413 - fix locking screen orientation to be fission compatible. r=farre
Both the deprecated `Screen.lockOrientation` and replacement
`ScreenOrientation.lock` APIs have been updated to make use of a new
`OrientationLock` field on the `BrowsingContext`. This replaces the
storage and use of APIs for this on the root docshell.

In the non fission case things should behave the same, as pending
promises for previous calls to `Screen.lockOrientation` will still be
cancelled in process. If there are `BrowsingContext`s in other
processes though, IPC will be sent to the parent, and then each other
child to cancel them. This should be spec compliant as the spec is
already racy with regards to multiple `lockOrientation` calls.

This new implementation has a little extra IPC than the optimal
implementation would since the root `BrowsingContext`s
`OrientationLock` is set using the normal `SyncedContext` machinery,
rather than combining the `AbortOtherOrientationPendingPromises`
message for a single message.

This commit fixes both Bug 1597413 and Bug 1597443.

Differential Revision: https://phabricator.services.mozilla.com/D70416
2020-04-27 15:43:36 +00:00
Andreas Farre
6adf2b375d Bug 1576188 - Handle save-as for cross process iframes. r=peterv
Depends on D70388

Differential Revision: https://phabricator.services.mozilla.com/D70389
2020-04-27 05:41:40 +00:00
Dorel Luca
c2d429f9a0 Backed out 2 changesets (bug 1576188) for Build bustage in docshell/base/BrowsingContext.cpp. CLOSED TREE
Backed out changeset 7e5e86986811 (bug 1576188)
Backed out changeset b731cbad59a8 (bug 1576188)
2020-04-24 23:02:11 +03:00
Andreas Farre
55a186014d Bug 1576188 - Handle save-as for cross process iframes. r=peterv
Depends on D70388

Differential Revision: https://phabricator.services.mozilla.com/D70389
2020-04-24 15:47:26 +00:00
Nika Layzell
e0f0ac8afa Bug 1580565 - Part 6: Add a unique ID to each BrowsingContextGroup, r=kmag
This allows us to explicitly specify BrowsingContextGroups when synchronizing
them. A major advantage of this is that it means we can handle an attempt to
create a BrowsingContext with a parent which the content process is unaware of,
which is possible due to changes to the EnsureSubscribed logic in earlier
patches in this stack.

This is OK, because in the case where the content process cannot see its parent,
the parent must be imminently discarding.

Differential Revision: https://phabricator.services.mozilla.com/D71668
2020-04-24 18:33:09 +00:00
Nika Layzell
cc54537c86 Bug 1580565 - Part 4: Use WindowContext to manage BrowsingContext cached status, r=farre
The existing infrastructure which stored cached BrowsingContexts on the
BrowsingContextGroup was added before WindowContexts were added, and can cause
racing issues with partially discarded trees during process switches.

Differential Revision: https://phabricator.services.mozilla.com/D71238
2020-04-24 18:33:04 +00:00
Narcis Beleuzu
fffdcb0203 Backed out 7 changesets (bug 1580565) for bustages on nsDocShell.cpp . CLOSED TREE
Backed out changeset 8237f9a307f8 (bug 1580565)
Backed out changeset 47f5698d6c72 (bug 1580565)
Backed out changeset e1802670dcc4 (bug 1580565)
Backed out changeset 0a44c410b59b (bug 1580565)
Backed out changeset 20dbcfc9eacc (bug 1580565)
Backed out changeset cdf2b600e779 (bug 1580565)
Backed out changeset a421d33d03ce (bug 1580565)
2020-04-24 05:31:55 +03:00
Nika Layzell
88293ee406 Bug 1580565 - Part 6: Add a unique ID to each BrowsingContextGroup, r=kmag
This allows us to explicitly specify BrowsingContextGroups when synchronizing
them. A major advantage of this is that it means we can handle an attempt to
create a BrowsingContext with a parent which the content process is unaware of,
which is possible due to changes to the EnsureSubscribed logic in earlier
patches in this stack.

This is OK, because in the case where the content process cannot see its parent,
the parent must be imminently discarding.

Differential Revision: https://phabricator.services.mozilla.com/D71668
2020-04-23 21:52:51 +00:00