InputStreamShim and OutputStreamShim now hold a strong reference to the callback and it's released after calling nsIInputStreamCallback::OnInputStreamReady() and nsIOutputStreamCallback::OnOutputStreamReady()
Differential Revision: https://phabricator.services.mozilla.com/D54147
--HG--
extra : moz-landing-system : lando
The preferences network.netlink.route.check.IPv4 and network.netlink.route.check.IPv6 were removed in bug 1593693 and the values are now hardcoded because they are used by Linux/Android implementation of nsNetworkLinkService for link status detection and they are not supposed to be changed by the user.
Differential Revision: https://phabricator.services.mozilla.com/D55587
--HG--
extra : moz-landing-system : lando
Looks like this can sometimes fail with moz-extension URIs, so we shouldn't crash
Differential Revision: https://phabricator.services.mozilla.com/D54249
--HG--
extra : moz-landing-system : lando
Without DocumentChannel, nsExtProtocolChannel::OpenURL calls into nsExternalHelperAppService::LoadURI in the content process.
We then manually forward this to the parent process over PContent, create a RemoteWindowContext around the browser parent, and then call LoadURI again.
With DocumemntChannel, the nsExtProtocolChannel already lives in the parent, so we just need to provide a RemoteWindowContext directly (that the code accesses via GetInterface on the callbacks).
Differential Revision: https://phabricator.services.mozilla.com/D54247
--HG--
extra : moz-landing-system : lando
We perform this check in the first OnDataAvailable, instead of doing it in
OnStopRequest in case a network down event occurs after the data has arrived
but before we fire OnStopRequest. That would cause us to report a missing
networkID, even though it was not empty while receiving data.
Differential Revision: https://phabricator.services.mozilla.com/D55574
--HG--
extra : moz-landing-system : lando
Stuff that's infallible and not virtual has no reason to return an nsresult.
Differential Revision: https://phabricator.services.mozilla.com/D54831
--HG--
extra : moz-landing-system : lando
The problem is that the suffix is not always computed when Firefox starts up.
This patch adds a pref `network.notify.initial_call` that controls whether
CheckAdaptersAddresses gets called imediately after.
This call is necessary in order to compute the suffix list, VPN status, etc.
This patch also ensures that OnDnsSuffixListUpdated gets called by
NetlinkService::ComputeDNSSuffixList on Android. This notification is
necessary for the TRRService to pick up the suffix list.
Differential Revision: https://phabricator.services.mozilla.com/D55303
--HG--
extra : moz-landing-system : lando
There's just no use for it, it was an unnecessary virtual interface, with a single concreate class and only ever used in C++.
Differential Revision: https://phabricator.services.mozilla.com/D55069
--HG--
extra : moz-landing-system : lando
Use QueryObject instead. Some variable renaming to make it clearer we are dealing with a http channel.
Differential Revision: https://phabricator.services.mozilla.com/D55238
--HG--
extra : moz-landing-system : lando
CacheEntry::GetAltDataSize() can throw an error if the size isn't known yet, i.e. when the output stream wasn't closed yet. nsHttpChannel::OpenCacheInputStream() doesn't check the return value and in case of failure uninitialized altDataSize is stored in mAltDataLength.
Differential Revision: https://phabricator.services.mozilla.com/D55085
--HG--
extra : moz-landing-system : lando
Updating the PSL while Firefox is running could cause principals to have
a different base domain before/after the update.
See bug 1582647 comment 30
Differential Revision: https://phabricator.services.mozilla.com/D55014
--HG--
extra : moz-landing-system : lando
This allows test toolkit/components/places/tests/browser/browser_multi_redirect_frecency.js and others to pass when fission is enabled.
The content process expects to know the chain of redirects encountered while opening a URI. The DocumentChannelParent gather that information and sends it to the new ContentChild which can then propagate the information to the new nsDocShell.
The data used to only be passed around during same-origin redirects when fission mode was enabled.
In order to allow for move semantics and preventing unnecessary copy of the DocumentChannelRedirect array, we make the nsIChildProcessChannelListener::onChannelReady property C++ only (noscript).
As we have only one concrete nsIChildProcessChannelListener class (ChildProcessListener) and that the unique OnChannelReady implementation is infallible; we really don't need for the method to return nsresult (so we declare it nostdcall). This helps simplify that call.
Differential Revision: https://phabricator.services.mozilla.com/D54909
--HG--
extra : moz-landing-system : lando
A typo prevented for moves to actually occur. Fix other IPDL entry points while at it that could benefit from move semantics.
Depends on D54907
Differential Revision: https://phabricator.services.mozilla.com/D54908
--HG--
extra : moz-landing-system : lando
The patch changes InputStreamShim::AsyncWait() so it checks the buffer state and if there is some data available the callback is immediately notified. Without this check the callback would be notified only when new data is delivered from the network.
Differential Revision: https://phabricator.services.mozilla.com/D53972
--HG--
extra : moz-landing-system : lando
The previous site URI is now only written on the parent and sent back to the child once all redirects have completed.
In a follow up we will also transfer this information when a process switch occur as it's currently broken.
Differential Revision: https://phabricator.services.mozilla.com/D53926
--HG--
extra : moz-landing-system : lando
Rather that setting the property bag on both the child and parent from the docshell; we first set it on the parent instead, and once the redirect (or process switch) has completed we carry that bag across.
Differential Revision: https://phabricator.services.mozilla.com/D53924
--HG--
extra : moz-landing-system : lando
Add static CopyFrom method which is to be used in a follow-up patch. The static method takes a nsIWritablePropertyBag so that we don't need to cast to the concrete class.
Differential Revision: https://phabricator.services.mozilla.com/D53923
--HG--
extra : moz-landing-system : lando
Looks like this can sometimes fail with moz-extension URIs, so we shouldn't crash
Differential Revision: https://phabricator.services.mozilla.com/D54249
--HG--
extra : moz-landing-system : lando
Without DocumentChannel, nsExtProtocolChannel::OpenURL calls into nsExternalHelperAppService::LoadURI in the content process.
We then manually forward this to the parent process over PContent, create a RemoteWindowContext around the browser parent, and then call LoadURI again.
With DocumemntChannel, the nsExtProtocolChannel already lives in the parent, so we just need to provide a RemoteWindowContext directly (that the code accesses via GetInterface on the callbacks).
Differential Revision: https://phabricator.services.mozilla.com/D54247
--HG--
extra : moz-landing-system : lando
Not having a responseHead or browsingContext should not cause a crash or exception
In xpcshell-tests we don't really have a browsingContext, so we want to make
sure we don't crash when that happens.
If the channel failed, we may not have a response head. In that case we don't
want the call to ComputeCrossOriginOpenerPolicyMismatch to be what throws
an exception.
Differential Revision: https://phabricator.services.mozilla.com/D54408
--HG--
extra : moz-landing-system : lando
There are 2 redirections happened on the tracking resource:
`nsHttpChannel` -> `InterceptedHttpChannel` -> `nsHttpChannel`.
`mTopWindowURI` is not copied to during the first redirection because it checks if the target channel is a `nsHttpChannel`.
Differential Revision: https://phabricator.services.mozilla.com/D52181
--HG--
extra : moz-landing-system : lando
There was no need for the ChannelEventQueue and GetNeckoTarget() was always retuning the main thread anyway.
Differential Revision: https://phabricator.services.mozilla.com/D53140
--HG--
extra : moz-landing-system : lando
This expose that some methods aren't doing anything. We will address those in a follow-up change.
Differential Revision: https://phabricator.services.mozilla.com/D52783
--HG--
extra : moz-landing-system : lando
- Adds the `network.trr.enable_when_vpn_detected` defaulting to false. This means detecting a PPP adapter will make IsExcludedFromTRR always return true - it does not affect the `network.trr.mode` pref.
- Adds a test that when nsINetworkLinkService.vpnDetected is true we skip all TRR requests
- Makes it so we update the excludedDomains list and VPN detected status for TRR on any network:link-status-changed observer notification that is received.
Differential Revision: https://phabricator.services.mozilla.com/D53356
--HG--
extra : moz-landing-system : lando
- Since IsExcludedFromTRR may be called from multiple threads we should make sure that the member variables it uses are either atomic or locked.
- Makes IsTRRBlacklisted call IsExcludedFromTRR instead of querying variables again.
- Removes hardcoded checks for localhost and .local, since these are included in network.trr.builtin-excluded-domains
Differential Revision: https://phabricator.services.mozilla.com/D53984
--HG--
extra : moz-landing-system : lando
This patch fixes two issues where we may mistakenly load a TRR record even though the host is part of the excluded-domains list:
1. If a.com is part of the excluded domains, but b.com is not, then when we first resolve b.com using TRR, the server may also push the record for a.com; Previously we didn't check if the pushed record is also excluded, which could lead us to load it from the TRR cache.
2. If b.com is resolved using TRR, but later b.com is added to the excluded-domains list, we may mistakenly load b.com from the TRR cache, even though we should use platform DNS for it.
Differential Revision: https://phabricator.services.mozilla.com/D53354
--HG--
extra : moz-landing-system : lando
Currently DocumentChannelParent serves two fairly separate functions.
It acts as a logic controller for a connecting load (ultimately on behalf of a CanonicalBrowsingContext), that creates a channel and once it gets a response, figures out the right thing to do with it (send to the originating process, send to a new process, handle as a download etc).
It's the parent-side IPDL actor for an nsIChannel implementation that we hold in the docshell as a placeholder while the above happens. This is largely a backwards compatibility hack since docshell expects to have a channel when a load has been initiated (but in the future we could do loads more directly through BrowsingContext and rewrite docshell to understand waiting on that).
This patch splits this into two separate classes (and adds more documentation explaining exactly what each one does). It shouldn't affect any behaviour.
Differential Revision: https://phabricator.services.mozilla.com/D53383
--HG--
rename : netwerk/ipc/DocumentChannelParent.cpp => netwerk/ipc/DocumentLoadListener.cpp
extra : moz-landing-system : lando
- Adds the `network.trr.enable_when_vpn_detected` defaulting to false. This means detecting a PPP adapter will make IsExcludedFromTRR always return true - it does not affect the `network.trr.mode` pref.
- Adds a test that when nsINetworkLinkService.vpnDetected is true we skip all TRR requests
- Makes it so we update the excludedDomains list and VPN detected status for TRR on any network:link-status-changed observer notification that is received.
Differential Revision: https://phabricator.services.mozilla.com/D53356
--HG--
extra : moz-landing-system : lando
This patch makes network change event different from network ID change event on Linux and Android. Network change event is now also sent when any address has been added, removed or changed.
Differential Revision: https://phabricator.services.mozilla.com/D53796
--HG--
extra : moz-landing-system : lando
These two functions both have a large number of arguments that are largely identical (and ones missing from the PContent one are mostly oversights).
Unifying both to take a single argument and return the same result means we can unify the serialization and return value (promise) handling.
Differential Revision: https://phabricator.services.mozilla.com/D53382
--HG--
extra : moz-landing-system : lando
The signatureInfo that has been used in ExternalHelperAppService and
ReputationService has been stored Array of nsIX509CertList, which
isn't necessary because only the raw bytes of the certs are required.
This patch intends to remove the usage of nsIX509CertList and store
the raw bytes directly.
Differential Revision: https://phabricator.services.mozilla.com/D44243
--HG--
extra : moz-landing-system : lando
- removes nsNotifyAddrListener::ChangeEvent in favour of NS_NewRunnableFunction
- adds new topic for network ID change notification
Differential Revision: https://phabricator.services.mozilla.com/D52689
--HG--
extra : moz-landing-system : lando