Commit Graph

1235 Commits

Author SHA1 Message Date
Matt Woodrow
1f62fbffdd Bug 1627533 - Have DocumentLoadListener retrieve the request context id from the BrowsingContext and use it for http loads. r=dragana,necko-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D75886
2020-05-21 03:38:45 +00:00
Noemi Erli
3adaaeb800 Backed out 3 changesets (bug 1627533) for causing assertions in RequestContextService.cpp CLOSED TREE
Backed out changeset 3b35a1852a60 (bug 1627533)
Backed out changeset 70fa5e075269 (bug 1627533)
Backed out changeset 0d1046670534 (bug 1627533)
2020-05-21 04:16:21 +03:00
Matt Woodrow
f9fa9d6117 Bug 1627533 - Have DocumentLoadListener retrieve the request context id from the BrowsingContext and use it for http loads. r=dragana,necko-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D75886
2020-05-20 23:41:46 +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
Tom Tung
5485075de6 Bug 1605176 - Run a cross site origin iframe in webCOOP+COEP process if the COOP and COEP are set; r=nika
Differential Revision: https://phabricator.services.mozilla.com/D74666
2020-05-14 09:57:16 +00:00
Dylan Roeh
2157c7820c Bug 1596825 - Add NavigationDelegate.onSubframeLoadRequest to handle non-top-level load requests. r=snorp,mattwoodrow,geckoview-reviewers,agi
Differential Revision: https://phabricator.services.mozilla.com/D74939
2020-05-19 17:05:42 +00:00
Liang-Heng Chen
466189ebb4 Bug 1631676 - Part 2: remember FPI state in CookieJarSettings; r=baku,timhuang
Differential Revision: https://phabricator.services.mozilla.com/D74050
2020-05-19 14:47:57 +00:00
Eden Chuang
16b5f23697 Bug 1532287 - P2 Propagate loading document/worker's COEP to nsHttpChannel through nsILoadInfo r=necko-reviewers,valentin,JuniorHsu
Currently, the worker's COEP is saved in WorkerPrivate and not be respected when loading resources in workers.
This patch adds an attribute loadingEmbedderPolicy in nsILoadInfo, which indicates the COEP header the loading must be respected.

The default value of loadingEmbedderPolicy is nsILoadInfo::EMBEDDER_POLICY_NULL.
loadingEmbedderPolicy is initialized with the COEP of the BrowsingContext used for creating LoadInfo.
And it could be set to other value when fetch in workers.

Differential Revision: https://phabricator.services.mozilla.com/D73690
2020-05-19 12:50:39 +00:00
Dimi Lee
ae8751a56d Bug 1637194 - P2. Set firstPartyDomain to CookieJarSetting in nsHttpChannel::AsyncOpen r=necko-reviewers,timhuang,baku,kershaw
FirstPartyDomain is only set while loading a top-level document.
We added in nsHttpChannel::AsyncOpen to ensure that the value is updated
whenever we open a channel.

Differential Revision: https://phabricator.services.mozilla.com/D75277
2020-05-19 09:47:25 +00:00
Dimi Lee
7cf904bbc5 Bug 1637194 - P1. Add firstPartyDomain to CookieJarSetting r=timhuang,baku
Differential Revision: https://phabricator.services.mozilla.com/D75276
2020-05-19 09:47:12 +00:00
Kershaw Chang
2cbb8cd25e Bug 1539819 - P2: Introduce PProxyConfigLookup.ipdl for get proxy config in TRRServiceChannel r=dragana
Differential Revision: https://phabricator.services.mozilla.com/D68398
2020-05-18 20:18:05 +00:00
Kershaw Chang
bdbecde447 Bug 1539819 - P1: Make TRRService work in socket process r=dragana,necko-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D68880
2020-05-18 20:18:03 +00:00
Aaron Klotz
53710190f5 Bug 1637452: Part 7 - Fix JNI includes in netwerk; r=necko-reviewers,valentin
In this bug we're moving away from monolithic JNI headers to class-specific
headers so that we don't have to rebuild the world every time we make a change
to a JNI interface.

Differential Revision: https://phabricator.services.mozilla.com/D75370
2020-05-15 17:04:32 +00:00
Razvan Maries
481517ce87 Backed out 2 changesets (bug 1558394) for perma failures on iframe_sandbox_anchor_download_block_downloads.sub.tentative.html. CLOSED TREE
Backed out changeset 79046ff8143b (bug 1558394)
Backed out changeset e13ede3c68d4 (bug 1558394)
2020-05-15 19:18:34 +03:00
Sebastian Streich
bb0855332f Bug 1558394 - Pass the TriggeringSandboxFlags to nsILoadinfo r=ckerschb,smaug,necko-reviewers,valentin
Add triggering Sandbox flags to loadinfo
***
Pass triggering Flags into Loadinfo

Differential Revision: https://phabricator.services.mozilla.com/D69588
2020-05-15 14:03:28 +00:00
Kershaw Chang
7922f6e91f Bug 1549323 - Make sure session cache is cleared in socket process r=keeler
Differential Revision: https://phabricator.services.mozilla.com/D74906
2020-05-14 12:21:59 +00:00
Bogdan Tara
edcb53f163 Backed out 2 changesets (bug 1558394) for nsDocShellLoadState related bustage CLOSED TREE
Backed out changeset 5889105bd089 (bug 1558394)
Backed out changeset 80a0ea17c9f8 (bug 1558394)
2020-05-14 15:17:32 +03:00
Sebastian Streich
9ce86dc585 Bug 1558394 - Pass the TriggeringSandboxFlags to nsILoadinfo r=ckerschb,smaug,necko-reviewers,valentin
Add triggering Sandbox flags to loadinfo
***
Pass triggering Flags into Loadinfo

Differential Revision: https://phabricator.services.mozilla.com/D69588
2020-05-14 10:04:44 +00:00
Dan Glastonbury
0f8ebacc34 Bug 1637783 - Relax SetLoadFlags hard assert to soft assert. r=mattwoodrow
Differential Revision: https://phabricator.services.mozilla.com/D75215
2020-05-13 22:49:01 +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
Tim Huang
e0a1626842 Bug 1633851 - Part 2: Moving GetTopWindowExcludingExtensionAccessibleContentFrames() to AntiTrackingUtils. r=baku
Differential Revision: https://phabricator.services.mozilla.com/D73200
2020-05-13 13:38:48 +00:00
Tim Huang
1fa1133990 Bug 1633851 - Part 1: Add a 'IsThirdPartyContextToTopWindow' flag to LoadInfo. r=baku
We add a 'IsThirdPartyContextToTopWindow' flag in the LoadInfo. This
flag shows if the channel is considered as a third party related to the
top-level window.

This flag would be set when opening the channel in the parent process.

Differential Revision: https://phabricator.services.mozilla.com/D73199
2020-05-13 13:38:41 +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
ssengupta
cf852bbfb9 Bug 1635399 - Function PrincipalInfoToPrincipal now returns Result<nsCOMPtr<nsIPrincipal>, nsresult> r=ckerschb
Differential Revision: https://phabricator.services.mozilla.com/D73868
2020-05-12 19:02:05 +00:00
Jean-Yves Avenard
28d4ac9c33 Bug 1634982 - Don't call DocumentChannelBridgeDisconnected when already being disconnected from the DocumentLoadListener. r=mattwoodrow
Differential Revision: https://phabricator.services.mozilla.com/D74517
2020-05-11 00:42:09 +00:00
Dan Glastonbury
39c9e7dd94 Bug 1624550 - P3: Update Global History from DocumentLoadListener in Parent process. r=mak,farre,mattwoodrow
Avoid round-trip Parent->Content->Parent to add visited URI to browsing history.

Differential Revision: https://phabricator.services.mozilla.com/D72278
2020-05-08 03:28:42 +00:00
Matt Woodrow
3d6e4f24c6 Bug 1635995 - Allow CSP service to do redirect checks on documents in the parent, rather than doing it manually. r=ckerschb
Differential Revision: https://phabricator.services.mozilla.com/D74170
2020-05-08 02:53:57 +00:00
Nika Layzell
2454ade94e Bug 1633820 - Part 3: Get rid of PBrowserOrId, r=mattwoodrow,necko-reviewers,dragana
The 'Id' variant was only used with b2g for remote `mozbrowser`s, and is no
longer relevant. The new code instead uses `PBrowser` directly in all cases.

Differential Revision: https://phabricator.services.mozilla.com/D72933
2020-05-07 22:49:06 +00:00
Razvan Maries
7a5b66f9b6 Backed out 5 changesets (bug 1633820) for build bustages at TabContext.cpp. CLOSED TREE
Backed out changeset 0a20dd1935d7 (bug 1633820)
Backed out changeset 626e834293ed (bug 1633820)
Backed out changeset 14cc454a8cbc (bug 1633820)
Backed out changeset 7bbcb9266b87 (bug 1633820)
Backed out changeset ef99672bd2af (bug 1633820)
2020-05-08 00:59:20 +03:00
Nika Layzell
dd35cc6b02 Bug 1633820 - Part 3: Get rid of PBrowserOrId, r=mattwoodrow,necko-reviewers,dragana
The 'Id' variant was only used with b2g for remote `mozbrowser`s, and is no
longer relevant. The new code instead uses `PBrowser` directly in all cases.

Differential Revision: https://phabricator.services.mozilla.com/D72933
2020-05-07 17:45:12 +00:00
Kershaw Chang
2531104710 Bug 1623380 - Send ODA directly to content process r=dragana
Differential Revision: https://phabricator.services.mozilla.com/D67609
2020-05-07 14:39:21 +00:00
Dorel Luca
ed73e1d6d4 Backed out changeset 2b9fc84a789b (bug 1623380) for Mochitest failures in dist/include/mozilla/RefPtr.h. CLOSED TREE 2020-05-07 15:17:30 +03:00
Kershaw Chang
467f6725fc Bug 1623380 - Send ODA directly to content process r=dragana
Differential Revision: https://phabricator.services.mozilla.com/D67609
2020-05-07 11:12:46 +00:00
Simon Giesecke
61ad805d68 Bug 1626570 - Use CopyableTArray in ipdlc as member type for now. r=nika
Differential Revision: https://phabricator.services.mozilla.com/D73685
2020-05-07 08:11:08 +00:00
Gijs Kruitbosch
88153109ac Bug 1633790 - pass channels to stream conversion getContentType and always allow PDF.js use for user-opened local PDF files, r=mattwoodrow,jaws
Differential Revision: https://phabricator.services.mozilla.com/D73511
2020-05-06 20:34:51 +00:00
Bogdan Tara
7fce40912d Backed out 5 changesets (bug 1633820) for bustages complaining about TabContext CLOSED TREE
Backed out changeset 4982d41d5e6b (bug 1633820)
Backed out changeset 9803c41e42f9 (bug 1633820)
Backed out changeset 2475bbab03a8 (bug 1633820)
Backed out changeset 762f0b2c154c (bug 1633820)
Backed out changeset f9ea871a0227 (bug 1633820)
2020-05-06 22:39:46 +03:00
Nika Layzell
da2aae6af5 Bug 1633820 - Part 3: Get rid of PBrowserOrId, r=mattwoodrow,necko-reviewers,dragana
The 'Id' variant was only used with b2g for remote `mozbrowser`s, and is no
longer relevant. The new code instead uses `PBrowser` directly in all cases.

Differential Revision: https://phabricator.services.mozilla.com/D72933
2020-05-06 17:42:41 +00:00
shashvat
22ff7b4e5c Bug 1629425 Removed redundant return statement r=necko-reviewers,valentin
Differential Revision: https://phabricator.services.mozilla.com/D71545
2020-04-20 11:45:25 +00:00
Simon Giesecke
00122bbae3 Bug 1626570 - Improve handling of copying arrays in netwerk/. r=necko-reviewers,valentin
Differential Revision: https://phabricator.services.mozilla.com/D73678
2020-05-06 11:48:42 +00:00
Nika Layzell
573962fe33 Bug 1634764 - Add helpers for Top/Parent WindowContext, r=farre
There are various times when it would be useful to get the toplevel or parent
WindowContext from a window or browsing context. While this is already possible,
it's currently somewhat inconvenient.

Differential Revision: https://phabricator.services.mozilla.com/D73500
2020-05-04 14:26:34 +00:00
Nicholas Nethercote
fe37816cbd Bug 1628033 - Add pid to the socket process in about:memory. r=valentin,necko-reviewers
This is modelled on the corresponding code in
`RDDParent::RecvRequestMemoryReport()`.

Also rename it `Socket` to match other content processes like `GPU` and `RDD`.

Differential Revision: https://phabricator.services.mozilla.com/D72995
2020-04-30 00:46:14 +00:00
sagudev
94a5c2f430 Bug 1319881 - Remove UsingNeckoIPCSecurity r=valentin,necko-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D72534
2020-04-29 12:00:01 +00:00
Jean-Yves Avenard
94a3210fdf Bug 1633644 - P2. Do not call RedirectToRealChannel if the channel got cancelled. r=mattwoodrow.
Depends on D72795

Differential Revision: https://phabricator.services.mozilla.com/D72809
2020-04-28 22:31:55 +00:00
Jean-Yves Avenard
f7bbf64d0e Bug 1633644 - P1. Handle case where the DocumentChannel got cancelled mid-air. r=mattwoodrow
Differential Revision: https://phabricator.services.mozilla.com/D72795
2020-04-28 12:29:52 +00:00
Matt Woodrow
9bc5c5b884 Bug 1633310 - Don't do pre-load shouldLoadURI process switches for leaving about:newtab in the web process. r=nika,mconley
Differential Revision: https://phabricator.services.mozilla.com/D72583
2020-04-28 19:45:43 +00:00
Kershaw Chang
4db371a46e Bug 1512478 - Use sync IPC to get client auth data from parent process r=keeler,mccr8
Differential Revision: https://phabricator.services.mozilla.com/D36911
2020-04-28 20:12:43 +00:00
Dan Glastonbury
6ffa81c157 Bug 1623565 - P3: Remove mLoadFlags from DocumentChannelCreationArgs. r=mattwoodrow,jya
Differential Revision: https://phabricator.services.mozilla.com/D67799
2020-04-27 05:38:15 +00:00
Matt Woodrow
20f213591b Bug 1624318 - Serialize replacement config input stream as a blob. r=baku,necko-reviewers,valentin
Differential Revision: https://phabricator.services.mozilla.com/D71872
2020-04-27 04:49:00 +00:00
Matt Woodrow
a34398fd9f Bug 1602318 - Initiate document loads in the parent process in parallel with setting up the content process side. r=nika,jya
Differential Revision: https://phabricator.services.mozilla.com/D72112
2020-04-26 00:54:15 +00:00
Matt Woodrow
382b007694 Bug 1602318 - Simplify DocumentChannelParent construction so that everything happens in Init. r=jya,necko-reviewers,valentin
Differential Revision: https://phabricator.services.mozilla.com/D72111
2020-04-26 00:53:37 +00:00