We want dweb URLs to continue working as before bug 1536744 landed.
So we make sure to instantiate it as an nsStandardURL.
This is not a good long-term solution, as we don't want to hardcode
all the various schemes that we want to behave properly.
The fix would be to add a new spec-compliant nsIURI implementation,
based on RustURL and use it for all unknown schemes.
See bug 1561860 for a more complete solution.
Differential Revision: https://phabricator.services.mozilla.com/D36168
--HG--
extra : moz-landing-system : lando
This patche changes only security/manager/ssl/SSLServerCertVerification.cpp.
Differential Revision: https://phabricator.services.mozilla.com/D28741
--HG--
extra : moz-landing-system : lando
To run task_for_pid() on child processes, we need the child task port for
security reasons. This port can be obtained via a Mach IPC exchange.
This is what GeckoChildProcessHost::GetChildTask() provides, so we use it
in cocoa's version of GetProcInfo()
Differential Revision: https://phabricator.services.mozilla.com/D25927
--HG--
extra : moz-landing-system : lando
To run task_for_pid() on child processes, we need the child task port for
security reasons. This port can be obtained via a Mach IPC exchange.
This is what GeckoChildProcessHost::GetChildTask() provides, so we use it
in cocoa's version of GetProcInfo()
Differential Revision: https://phabricator.services.mozilla.com/D25927
--HG--
extra : moz-landing-system : lando
Since the RESOLVE_JAR_URI flag is not used for moz-extension, ResolveJARURI
would never get called in ExtensionProtocolHandler, so it's OK to consider
it threadsafe.
Differential Revision: https://phabricator.services.mozilla.com/D33253
--HG--
extra : moz-landing-system : lando
Also, in many place, we use document uri as referrer. It is not right
for the case srdoc iframe. We should use the last non-srdoc parent
document's uri
Differential Revision: https://phabricator.services.mozilla.com/D30191
--HG--
rename : testing/web-platform/tests/referrer-policy/generic/iframe-inheritance.html => testing/web-platform/tests/referrer-policy/generic/inheritance/iframe-inheritance-data.html
rename : testing/web-platform/tests/referrer-policy/generic/iframe-inheritance.html => testing/web-platform/tests/referrer-policy/generic/inheritance/iframe-inheritance-srcdoc.html
extra : moz-landing-system : lando
This patch calls NetworkConnectivityService::GetSingleton() on the main thread
and keeps a ref to the service until shutdown.
Even though calling ncs->GetIPv6() off-main-thread is technically a data-race
in practice that's OK because only the simple decision whether to send
AAAA requests is made based on that value, which in itself is an optimization.
I filed bug 1556967 for making the connectivity service thread safe.
Differential Revision: https://phabricator.services.mozilla.com/D33765
--HG--
extra : moz-landing-system : lando
Normally, this method will return the entire in string if it has a scheme.
However, mParser->ParseURL may fail, leading to the scheme to be cleared,
and the result will be the same HTTP URL with the input appended to the
path. This triggers the assertion in NS_NewURI that the scheme should not
change.
As a fix, we bail out of nsStandardURL::Resolve() if the parsed scheme of
the input is different than the base URIs current scheme. This condition
is necessary, because we still need to support a deprecated form of relative
URLs like http:file or http:/path/file
Differential Revision: https://phabricator.services.mozilla.com/D33003
--HG--
extra : moz-landing-system : lando
This is an optimization. If we detect that the system can't use the IPv6
address, there's no point in making a request for it.
Depends on D33475
Differential Revision: https://phabricator.services.mozilla.com/D33476
--HG--
extra : moz-landing-system : lando
Normally, this method will return the entire in string if it has a scheme.
However, mParser->ParseURL may fail, leading to the scheme to be cleared,
and the result will be the same HTTP URL with the input appended to the
path. This triggers the assertion in NS_NewURI that the scheme should not
change.
As a fix, we bail out of nsStandardURL::Resolve() if the parsed scheme of
the input is different than the base URIs current scheme. This condition
is necessary, because we still need to support a deprecated form of relative
URLs like http:file or http:/path/file
Differential Revision: https://phabricator.services.mozilla.com/D33003
--HG--
extra : moz-landing-system : lando
The only protocol that can't be created off the main thread at the moment is
moz-extension, and that can be handled at a later time.
Differential Revision: https://phabricator.services.mozilla.com/D30713
--HG--
extra : moz-landing-system : lando
This is needed to pass a web-platform-test. Since unknown protocols use
nsSimpleURI and nsSimpleURI::GetHost returns an error code, that will fail.
Instead, we instantiate an nsStandardURL for the ssh scheme.
Once we change nsSimpleURI to be backed by MozURL we can probably remove this.
Differential Revision: https://phabricator.services.mozilla.com/D30707
--HG--
extra : moz-landing-system : lando
Before, we'd try to create a URI using the GIO protocol handler, and if that
succeeded, we'd return the protocol handler.
Now we can't return it if NS_NewURI succeeds, because NS_NewURI doesn't check
the protocol handler anymore. So instead we just instantiate the handler,
check if the scheme is supported, and if so return it.
Differential Revision: https://phabricator.services.mozilla.com/D30706
--HG--
extra : moz-landing-system : lando
nsSimpleURI doesn't really have the concept of a relative URI.
Since unknown protocol schemes will ultimately fall back to using nsSimpleURI,
we need to make sure that resolving a URI with certain base still works as
before, when those URIs were nsStandardURLs, created by the protocol handlers.
To achieve this we check to see if the "relative path" has a scheme. If it
does, we just return it, to be parsed by NS_NewURI. Otherwise, we use
MozURL (based on rust-url) to figure out the correct relative URL we should
return. This by itself manages to fix several failing web-platform tests.
Differential Revision: https://phabricator.services.mozilla.com/D30705
--HG--
extra : moz-landing-system : lando
* Add main thread assertions for "resource" and "moz-extension" protocols
* Use ::GetSingleton() for resource and moz-extension protocol handlers
Differential Revision: https://phabricator.services.mozilla.com/D30698
--HG--
extra : moz-landing-system : lando
This way all of the nsIURI creation will go through NS_NewURIOnAnyThread.
NS_NewURIOnAnyThread will be renamed to NS_NewURI in the final patch.
Differential Revision: https://phabricator.services.mozilla.com/D30696
--HG--
extra : moz-landing-system : lando
These URL types need both specific applications to be installed on Linux, and for the pref to list them as supported.
We do these checks in nsGIOProtocolHandler::NewChannel instead of performing them when creating the URLs.
Differential Revision: https://phabricator.services.mozilla.com/D30695
--HG--
extra : moz-landing-system : lando
If an XPIDL interface has a method or attribute that is [notxpcom],
then it is implicitly treated as [builtinclass], even if it is not
marked as such. For clarity, this patch goes through and marks every
place that relies on this behavior (aside from some test code).
Differential Revision: https://phabricator.services.mozilla.com/D30714
--HG--
extra : moz-landing-system : lando
We shouldn't search the cache and try to set TLS resumption token in nsSocketTransport::InitiateSocket() if the socket has SSL_NO_CACHE flag set, because NSS code might not honor the flag when the token is provided via API for external TLS session caches.
Differential Revision: https://phabricator.services.mozilla.com/D30726
--HG--
extra : moz-landing-system : lando
SSLTokensCache is a simple memory only storage for resumption tokens which are get and set using API for external TLS session caches in NSS.
Differential Revision: https://phabricator.services.mozilla.com/D29465
--HG--
extra : moz-landing-system : lando
This patch adds |setMatchedTrackingInfo| to channel to report matches that
are found in tracking annotation tables.
We have done something similar in nsIClassifiedChannel::setMatchedInfo to
report phishing protection matches.
Differential Revision: https://phabricator.services.mozilla.com/D28790
--HG--
extra : moz-landing-system : lando
ContentVerifier has been dead code since bug 1355166 (which, incidentally, means
it has no tests). Its presence is preventing improvements to
ContentSignatureVerifier (see e.g. bug 1534600), so this patch removes it.
As a result, the nsILoadInfo attributes verifySignedContent and enforceSRI are
also unused, so this patch removes those as well.
Differential Revision: https://phabricator.services.mozilla.com/D28885
--HG--
extra : moz-landing-system : lando
nsITabParent is exposed to frontend code and is generally used as a representation of a remote tab. We could just rename the interface to nsIBrowserParent and worry about it later, but I think it's better to rename the interface to nsIRemoteTab so that we can later work on splitting the interface away from the PBrowser protocol.
Note: Some frontend code refers to a TabParentId. This commit renames this to RemoteTabId. We need to figure out the purpose of TabId with fission.
Differential Revision: https://phabricator.services.mozilla.com/D28132
--HG--
rename : dom/interfaces/base/nsITabParent.idl => dom/interfaces/base/nsIRemoteTab.idl
extra : rebase_source : 9d8a1790a7bb10195ad063644d1a93d63b2afb72
The attributes for an interface should be on the line right before the
interface.
Interface attributes should be separated by spaces.
Clean up some trailing whitespace in widget/.
Differential Revision: https://phabricator.services.mozilla.com/D28234
--HG--
extra : moz-landing-system : lando