Commit Graph

6061 Commits

Author SHA1 Message Date
Sebastian Streich
88670a47e9 Bug 1580782 - Change Callsites to use nsIPrincipal->SchemeIs r=ckerschb
Differential Revision: https://phabricator.services.mozilla.com/D45654

--HG--
extra : moz-landing-system : lando
2019-09-26 10:47:16 +00:00
Sebastian Streich
154d7196d0 Bug 1581512 - Use plain or octetStream as default mime for XTCO -r=ckerschb
Differential Revision: https://phabricator.services.mozilla.com/D46004

--HG--
extra : moz-landing-system : lando
2019-09-26 10:06:05 +00:00
Daniel Varga
90b9fde46d Backed out changeset 156e22161091 (bug 1580138) for build bustage in toolkit/library/gtest/target. On a CLOSED TREE 2019-09-25 13:42:43 +03:00
Kershaw Chang
d2ab74115b Bug 1580138 - Use peer id to isolate token cache r=dragana,keeler
Differential Revision: https://phabricator.services.mozilla.com/D45406

--HG--
extra : moz-landing-system : lando
2019-09-25 10:22:25 +00:00
Sebastian Streich
b731ffbff3 Bug 1578991 - Skip Calling Sniffers in Case of NoSniff and JSON Mime r=ckerschb,dragana
Differential Revision: https://phabricator.services.mozilla.com/D45681

--HG--
extra : moz-landing-system : lando
2019-09-24 12:26:22 +00:00
Paul Zuehlcke
2189ac4496 Bug 1574469 - Implemented nsPermissionManager::LegacyTestPermissionFromURI for nsIURI queries with origin attributes. r=Ehsan
Differential Revision: https://phabricator.services.mozilla.com/D45847

--HG--
extra : moz-landing-system : lando
2019-09-19 17:07:22 +00:00
Jean-Yves Avenard
e3fc8f8970 Bug 1575744 - P8. Remove no longer necessary interface. r=mayhemer
Thanks to the promisifying of SendCrossProcessRedirect we no longer needs callback to DocumentChannelParent from nsHttpChannelParent. So we can remove the interface that allowed to do so.

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

--HG--
rename : netwerk/base/nsICrossProcessSwitchChannel.idl => netwerk/base/nsIProcessSwitchRequestor.idl
extra : moz-landing-system : lando
2019-09-20 04:09:48 +00:00
Jean-Yves Avenard
7cdc8e0a68 Bug 1575744 - P7. Promisify SendCrossProcessRedirect to avoid needing PHttpChannel to get a response. r=mayhemer
Differential Revision: https://phabricator.services.mozilla.com/D46163

--HG--
extra : moz-landing-system : lando
2019-09-21 11:14:49 +00:00
Jean-Yves Avenard
4986f63ec2 Bug 1575744 - P2. Add nsIProcessSwitchRequestor interface. r=mayhemer,nika
Will allow for SessionStore.jsm process switching to be used by other objects than nsHttpChannel.

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

--HG--
extra : moz-landing-system : lando
2019-09-20 04:09:46 +00:00
Bogdan Tara
bee28f01d7 Backed out 8 changesets (bug 1575744) for HttpChannelParent related assertion failures
Backed out changeset af61675dd488 (bug 1575744)
Backed out changeset bf794b9373c8 (bug 1575744)
Backed out changeset 39ffb74d2e12 (bug 1575744)
Backed out changeset c1547b3df672 (bug 1575744)
Backed out changeset 382ee8672027 (bug 1575744)
Backed out changeset 5abb38484f11 (bug 1575744)
Backed out changeset d5244c1bbfe8 (bug 1575744)
Backed out changeset c74b81debf73 (bug 1575744)

--HG--
rename : netwerk/base/nsIProcessSwitchRequestor.idl => netwerk/base/nsICrossProcessSwitchChannel.idl
2019-09-20 06:58:44 +03:00
Jean-Yves Avenard
1c9ba44fc0 Bug 1575744 - P8. Remove no longer necessary interface. r=mayhemer
Thanks to the promisifying of SendCrossProcessRedirect we no longer needs callback to DocumentChannelParent from nsHttpChannelParent. So we can remove the interface that allowed to do so.

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

--HG--
rename : netwerk/base/nsICrossProcessSwitchChannel.idl => netwerk/base/nsIProcessSwitchRequestor.idl
extra : moz-landing-system : lando
2019-09-18 13:17:05 +00:00
Jean-Yves Avenard
99df1db827 Bug 1575744 - P7. Promisify SendCrossProcessRedirect to avoid needing PHttpChannel to get a response. r=mayhemer
Differential Revision: https://phabricator.services.mozilla.com/D46163

--HG--
extra : moz-landing-system : lando
2019-09-18 13:14:30 +00:00
Jean-Yves Avenard
db9dcef811 Bug 1575744 - P2. Add nsIProcessSwitchRequestor interface. r=mayhemer,nika
Will allow for SessionStore.jsm process switching to be used by other objects than nsHttpChannel.

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

--HG--
extra : moz-landing-system : lando
2019-09-18 23:49:51 +00:00
Doug Thayer
5920fc459e Bug 1554242 - Don't open file just to ftell it r=baku
In bug 1554242 we're noticing main thread file IO sending a PNG
thumbnail as a blob over IPC. The stack is roughly
IPCBlobInputStream::Close() -> nsFileInputStream::Close() ->
nsFileStreamBase::DoOpen(). The file in question is always a
deferred open file, and we didn't open it in append mode, so there
is no way for ftell to be anything other than 0 (?). This was
verified with an assertion on a try run.

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

--HG--
extra : moz-landing-system : lando
2019-09-19 10:03:23 +00:00
Byron Campen [:bwc]
85cc5df79c Bug 1569183: Fix bugs where OnProxyAvailable would be called with a proxy info whose resolve flags did not match what was asked for. r=mayhemer
Differential Revision: https://phabricator.services.mozilla.com/D46052

--HG--
extra : moz-landing-system : lando
2019-09-17 18:19:38 +00:00
Valentin Gosu
ed3cd6651f Bug 1581655 - left shift of negative value -1 r=JuniorHsu
We should use ~0uL << x instead of ~0L << x because we are working with uint32_t

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

--HG--
extra : moz-landing-system : lando
2019-09-17 20:24:42 +00:00
Henri Sivonen
c193518677 Bug 1490601 part 2 - Move C++ entry points to encoding_c_mem to mfbt/. r=jwalden
Differential Revision: https://phabricator.services.mozilla.com/D43957

--HG--
extra : moz-landing-system : lando
2019-09-18 08:26:34 +00:00
Dragana Damjanovic
a8b9f215c0 Bug 1580557 - Remove nsISSLSocketControl.serverRootCertIsBuiltInRoot. r=keeler
Differential Revision: https://phabricator.services.mozilla.com/D45988

--HG--
extra : moz-landing-system : lando
2019-09-16 18:22:20 +00:00
Valentin Gosu
eb53fa62d3 Bug 1580130 - Add telemetry to record presence of the networkID when the connectivity check has completed r=dragana
When the IPv4 check is completed, we get the network ID and report to telemetry if it was empty or not. This allows us to more accurately determine if we always have a networkID.

Depends on D45331

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

--HG--
extra : moz-landing-system : lando
2019-09-13 06:41:38 +00:00
Valentin Gosu
b27c4726d0 Bug 1513574 - Remove UserAgentOverrides.jsm and UserAgentUpdates.jsm r=michal
Also removes the UA cache attached to nsILoadGroup and nsIRequestContext and the "http-on-useragent-request" observer notification.
If overriding the user agent is needed "http-on-modify-request" is equally usable (but should be used rarely, for performance reasons). A better way is using nsIDocShell.customUserAgent.

Depends on D14750

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

--HG--
extra : moz-landing-system : lando
2019-09-16 15:21:36 +00:00
Cosmin Sabou
b1cfe7b829 Backed out 4 changesets (bug 1513574) for causing several browser chrome failures. CLOSED TREE
Backed out changeset 7d950fc452fb (bug 1513574)
Backed out changeset 11f015a3e739 (bug 1513574)
Backed out changeset be6959a563f6 (bug 1513574)
Backed out changeset ce51efd054b8 (bug 1513574)

--HG--
extra : histedit_source : a7bc0055925ac352826572f96730f3d90815bda0
2019-09-16 12:40:40 +03:00
Valentin Gosu
f9ed039670 Bug 1513574 - Remove UserAgentOverrides.jsm and UserAgentUpdates.jsm r=michal
Also removes the UA cache attached to nsILoadGroup and nsIRequestContext and the "http-on-useragent-request" observer notification.
If overriding the user agent is needed "http-on-modify-request" is equally usable (but should be used rarely, for performance reasons). A better way is using nsIDocShell.customUserAgent.

Depends on D14750

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

--HG--
extra : moz-landing-system : lando
2019-09-16 08:38:24 +00:00
Matt Woodrow
b6167f6c16 Bug 1579765 - Early exit from NS_GetReferrerFromChannel if we had the internalReferrer property. r=mayhemer,smaug
If the docshell explicitly set this property with a nullptr value, then we should just return that.
This fixes a warning where we try QI a DocumentChannelChild to nsIHttpChannel when looking for the referrer.

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

--HG--
extra : moz-landing-system : lando
2019-09-16 07:22:17 +00:00
Cosmin Sabou
1aeb602d5e Backed out 4 changesets (bug 1513574) for Android build bustage and browser chrome failures. CLOSED TREE
Backed out changeset f155c449e516 (bug 1513574)
Backed out changeset 1f2bbbe0f781 (bug 1513574)
Backed out changeset 5f8b5f72a4ea (bug 1513574)
Backed out changeset 0e4cababccc7 (bug 1513574)
2019-09-13 21:38:18 +03:00
Valentin Gosu
ef68d827d8 Bug 1513574 - Remove UserAgentOverrides.jsm and UserAgentUpdates.jsm r=michal
Also removes the UA cache attached to nsILoadGroup and nsIRequestContext and the "http-on-useragent-request" observer notification.
If overriding the user agent is needed "http-on-modify-request" is equally usable (but should be used rarely, for performance reasons). A better way is using nsIDocShell.customUserAgent.

Depends on D14750

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

--HG--
extra : moz-landing-system : lando
2019-09-13 17:19:40 +00:00
Valentin Gosu
4e6807391a Bug 1558310 - Remove main thread check in nsStandardURL::nsStandardURL() r=dragana
Removing this check would allow us to see leaked URIs created off main thread.
This is OK because we already use a mutex to guard the linkedList

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

--HG--
extra : moz-landing-system : lando
2019-09-12 16:50:25 +00:00
Kevin Jacobs
4bf9806ed6 Bug 1562773 - Propagate Delegated Credential flag to nsITransportSecurityInfo r=keeler,jcj
This patch adds a new `mIsDelegatedCredential` parameter to nsITransportSecurityInfo, indicating whether or not a delegated credential keypair was used in the TLS handshake (see: https://tools.ietf.org/html/draft-ietf-tls-subcerts-03) .

This functionality is only available if _security.tls.enable_delegated_credentials_ is set to true.

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

--HG--
extra : moz-landing-system : lando
2019-09-11 15:19:57 +00:00
Paul Zuehlcke
00119452fc Bug 1574480 - Updated browser.js and OfflineAppsChild.jsm to use PermissionManager principal methods. r=johannh,smaug
Differential Revision: https://phabricator.services.mozilla.com/D42620

--HG--
extra : moz-landing-system : lando
2019-09-10 10:57:07 +00:00
Kershaw Chang
487ae96c4a Bug 1546816 - Part 1-1: Remove MITM_OK flag and bypassAuthentication r=keeler
Differential Revision: https://phabricator.services.mozilla.com/D45019

--HG--
extra : moz-landing-system : lando
2019-09-09 13:46:45 +00:00
Daisuke Akatsuka
a65bd31ef9 Bug 1572933: Introduce an attribute to raise the cache priority. r=pbro,mayhemer
For now, when we turn on `disable cache` switch in DevTools[1], web page loads
the contents without using the cache. Furthermore, DevTools as well comes to
load the contents DevTools inspects without using the cache. And, if the loaded
contents from the web page and DevTools was different, becomes impossible to
inspect the content correctly.
Thus, in order to make DevTools refer the same content the web page loaded,
makes DevTools load the contents inspecting from the cache at first, no matter
if disables the switch or not.

When turns on disable cache in DevTools, `LOAD_BYPASS_CACHE` flag is set into
`loadFlags` in the `docshell`.[2] The other hand, the content DevTools inspects
is loaded from a channel DevTools creates with `LOAD_FROM_CACHE` flag.[3]
However, because this channel is belong to same `loadGroup` of the `docshell`,
`LOAD_BYPASS_CACHE` is inherited and is choosen even if `LOAD_FROM_CACHE` is set.
Thus, in this patch, we introduce an attribute `preferCacheLoadOverBypass`
which raises the priority for `LOAD_FROM_CACHE` above `LOAD_BYPASS_CACHE` and
`LOAD_BYPASS_LOCAL_CACHE`.

[1] https://developer.mozilla.org/en-US/docs/Tools/Settings#Advanced_settings
[2] https://searchfox.org/mozilla-central/source/devtools/server/actors/targets/browsing-context.js#1227
[3] https://searchfox.org/mozilla-central/source/devtools/shared/DevToolsUtils.js#542-544

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

--HG--
extra : moz-landing-system : lando
2019-09-09 00:57:05 +00:00
Christian Holler
95fc013b8b Bug 1528951 - Implement Websocket fuzzing target for Necko. r=dragana
Differential Revision: https://phabricator.services.mozilla.com/D42816

--HG--
extra : moz-landing-system : lando
2019-09-05 16:28:42 +00:00
Coroiu Cristina
9683a17a37 Backed out changeset d2867a062f45 (bug 1574480) for browser-chrome failures at browser/base/content/test/general/browser_offlineQuotaNotification.js on a CLOSED TREE 2019-09-05 18:38:42 +03:00
Paul Zuehlcke
99bfbf1328 Bug 1574480 - Updated browser.js and OfflineAppsChild.jsm to use PermissionManager principal methods. r=johannh,smaug
Differential Revision: https://phabricator.services.mozilla.com/D42620

--HG--
extra : moz-landing-system : lando
2019-09-05 13:37:55 +00:00
Jean-Yves Avenard
1c657f7d19 Bug 1556489 - P25. Make nsIIdentChannel support conditional for nsBaseChannel. r=mayhemer
So that we can restrict QI(nsIIdentChannel) to nsIHttpChannel and DocumentChannelChild objects only.

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

MANUAL PUSH: multiple authors stack
2019-09-03 10:20:16 +10:00
Jean-Yves Avenard
f0b40a38d7 Bug 1556489 - P15. Move methods into dedicated nsI* interface. r=mayhemer
This allows in the future for the nsHttpChannel to deal with things others than the HttpChannelParent.

Differential Revision: https://phabricator.services.mozilla.com/D40972
2019-09-03 10:19:37 +10:00
Jean-Yves Avenard
b43fd91ea2 Bug 1556489 - P11. Add nIIdentChannel interface. r=mayhemer
The devtools listens to http-on-opening-request event which is expected to receive a nsIHttpChannel. However future changes will make it that it's not always a nsIHttpChannel that can fire such event.

As such we create an intermediary interface nsIIdentChannel and move the subset generating such event in nsIHttpChannel there.

Differential Revision: https://phabricator.services.mozilla.com/D40968
2019-09-03 10:19:34 +10:00
Matt Woodrow
a209298de2 Bug 1556489 - P7. Make LoadInfoArgsToLoadInfo works with LoadInfo class. r=mayhemer
Differential Revision: https://phabricator.services.mozilla.com/D40964
2019-09-03 10:19:11 +10:00
Jean-Yves Avenard
0c52caf2b2 Bug 1556489 - P6. Simplify use of namespace. r=mayhemer
This is a cosmetic only change.

Differential Revision: https://phabricator.services.mozilla.com/D40963
2019-09-03 10:19:10 +10:00
Jean-Yves Avenard
e76aa88e15 Bug 1556489 - P4. Add ability to set Document object on LoadInfo. r=mayhemer,ckerschb
This will be required to access the Performance object from future DocumentChannel.

Differential Revision: https://phabricator.services.mozilla.com/D41133
2019-09-03 10:18:58 +10:00
Jean-Yves Avenard
a23b70b74e Bug 1556489 - P3. Move logic on when to return the PerformanceStorage into nsILoadInfo. r=mayhemer
This more closely follow the code as earlier documented. To remove all ambiguities, the idl documentation was amended.

Differential Revision: https://phabricator.services.mozilla.com/D40961
2019-09-03 09:50:05 +10:00
Eric Rahm
e678238a60 Bug 1569323 - Remove verbose warning in SetUserPass. r=mayhemer
This removes a rather verbose warning during URI mutation. This often
happens for use cases such as attempting to clear the field. Since `Finalize`
is marked as `MOZ_MUST_USE` we can be confident that any failures that used
to be warned about are properly handled.

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

--HG--
extra : moz-landing-system : lando
2019-08-22 14:49:28 +00:00
Barret Rennie
b0cbc31990 Bug 1510569 - Implement serializers for nsITransportSecurityInfo, nsIX509Cert, and nsIX509CertList r=froydnj,keeler,mayhemer
As part of the ongoing effort to port the nsIWebProgress events from
RemoteWebProgress / WebProgressChild to BrowserParent / BrowserChild, we need
to (de)serialize the nsITransportSecurityInfo instance across the IPC layer.
The existing code was calling `NS_SerializeToString` which has the overhead of
(a) allocating a buffer and also performing base64 encoding/decoding. This
patch adds `IPC::ParamTraits` implementations for `nsITransportSecurityInfo`,
`nsIX509Certificate`, and `nsIX509CertList` that (de)serializes the params
directly onto and off of the IPC message so that we don't go through the
overhead of allocating and encoding/decoding an additional buffer.

This (de)serialization will address the performance issues present in the
current implementation.

As a side effect, I also make nsITransportSecurityInfo a builtinclass XPCOM
interface, since the existing serialization code was assuming it was, there is
only one implementation, and it is in C++.

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

--HG--
extra : moz-landing-system : lando
2019-08-28 18:55:31 +00:00
Dorel Luca
b09fe526aa Backed out 4 changesets (bug 1510569) for build bustage. CLOSED TREE
Backed out changeset d7db6a1935ce (bug 1510569)
Backed out changeset 03b7cf756a7f (bug 1510569)
Backed out changeset fa318eec0e76 (bug 1510569)
Backed out changeset cecb17bd8c03 (bug 1510569)
2019-08-28 21:46:40 +03:00
Barret Rennie
4ab0fd7d38 Bug 1510569 - Implement serializers for nsITransportSecurityInfo, nsIX509Cert, and nsIX509CertList r=froydnj,keeler,mayhemer
As part of the ongoing effort to port the nsIWebProgress events from
RemoteWebProgress / WebProgressChild to BrowserParent / BrowserChild, we need
to (de)serialize the nsITransportSecurityInfo instance across the IPC layer.
The existing code was calling `NS_SerializeToString` which has the overhead of
(a) allocating a buffer and also performing base64 encoding/decoding. This
patch adds `IPC::ParamTraits` implementations for `nsITransportSecurityInfo`,
`nsIX509Certificate`, and `nsIX509CertList` that (de)serializes the params
directly onto and off of the IPC message so that we don't go through the
overhead of allocating and encoding/decoding an additional buffer.

This (de)serialization will address the performance issues present in the
current implementation.

As a side effect, I also make nsITransportSecurityInfo a builtinclass XPCOM
interface, since the existing serialization code was assuming it was, there is
only one implementation, and it is in C++.

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

--HG--
extra : moz-landing-system : lando
2019-08-28 18:00:16 +00:00
Henrik Skupin
1803585259 Bug 1570104 - Add shared IPv4 range from RFC 6598 (100.64/10) to allowed list of IP addresses for testing. r=dragana
Differential Revision: https://phabricator.services.mozilla.com/D40167

--HG--
extra : moz-landing-system : lando
2019-08-28 10:58:48 +00:00
Michal Novotny
390918caab Bug 1567616 - network id based on default gateway is wrong when VPN overrides default gateway by more specific routes r=dragana
This patch implements NetlinkService which communicates with kernel via netlink socket. It keeps track of addresses, default routes, interfaces and neighbors and uses it to calculate network ID.

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

--HG--
rename : netwerk/system/linux/nsNotifyAddrListener_Linux.cpp => netwerk/system/linux/nsNetworkLinkService.cpp
rename : netwerk/system/linux/nsNotifyAddrListener_Linux.h => netwerk/system/linux/nsNetworkLinkService.h
extra : moz-landing-system : lando
2019-08-26 21:46:32 +00:00
Andreea Pavel
f042d32425 Backed out changeset 22469090e93e (bug 1567616) for build bustages on a CLOSED TREE
--HG--
rename : netwerk/system/linux/nsNetworkLinkService.cpp => netwerk/system/linux/nsNotifyAddrListener_Linux.cpp
rename : netwerk/system/linux/nsNetworkLinkService.h => netwerk/system/linux/nsNotifyAddrListener_Linux.h
2019-08-27 00:30:40 +03:00
Michal Novotny
128254f45e Bug 1567616 - network id based on default gateway is wrong when VPN overrides default gateway by more specific routes r=dragana
This patch implements NetlinkService which communicates with kernel via netlink socket. It keeps track of addresses, default routes, interfaces and neighbors and uses it to calculate network ID.

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

--HG--
rename : netwerk/system/linux/nsNotifyAddrListener_Linux.cpp => netwerk/system/linux/nsNetworkLinkService.cpp
rename : netwerk/system/linux/nsNotifyAddrListener_Linux.h => netwerk/system/linux/nsNetworkLinkService.h
extra : moz-landing-system : lando
2019-08-26 20:03:33 +00:00
Honza Bambas
e09f9634c2 Bug 1451714 - Fix comment over LOAD_NO_NETWORK_IO flag, r=michal
Simply removing the confusing and not much info providing sentence.

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

--HG--
extra : moz-landing-system : lando
2019-08-26 13:58:47 +00:00
Kershaw Chang
1ee6c512c5 Bug 1571356 - Add TRANSPARENT_PROXY_RESOLVES_HOST flag to connection info's hash key r=mayhemer
Differential Revision: https://phabricator.services.mozilla.com/D43043

--HG--
extra : moz-landing-system : lando
2019-08-22 15:13:36 +00:00