Commit Graph

7004 Commits

Author SHA1 Message Date
Kershaw Chang
f0bd5e236c Bug 1504512 - Do not delete mTrailers explicitly, r=valentin
Since mTrailers is nsAutoPtr, there is no need to delete it explicitly.

--HG--
extra : rebase_source : 0928c18382ef4820ca7379810becacfd7e18eff0
2018-11-09 02:53:00 +02:00
Randell Jesup
8773e64196 Bug 1505948: Add cache info to network profiler markers r=mstange,nwgh 2018-11-14 15:54:22 -05:00
Ciure Andrei
92c9686945 Backed out changeset e157b95e9b5e (bug 1505948) for HttpChannelChild.cpp build bustages CLOSED TREE 2018-11-14 23:41:01 +02:00
Randell Jesup
286dfeada3 Bug 1505948: Add cache info to network profiler markers r=mstange,nwgh 2018-11-14 15:54:22 -05:00
Nicholas Hurley
a4d48c1eb9 Bug 1505867 - Add pref for hpack table dumps. r=bagder
Now that h2 is pretty well stable, and we're fairly confident in our hpack table implementation, it's worth hiding this logging without some extra hoops, as it's just a lot of noise in logs.

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

--HG--
extra : moz-landing-system : lando
2018-11-09 07:23:17 +00:00
Dorel Luca
2f261feba3 Backed out changeset 365e0d2414bf (bug 1504728) for browser-chrome failures. CLOSED TREE 2018-11-09 18:48:39 +02:00
Ehsan Akhgari
b11a25f3c6 Bug 1504728 - Add a content blocking notification for indicating when a top-level page is using cookies or site data r=baku,valentin
Differential Revision: https://phabricator.services.mozilla.com/D11122

--HG--
extra : moz-landing-system : lando
2018-11-09 15:36:02 +00:00
Daniel Stenberg
c76f47455a bug 1505752 - fix whitespace trim of Timing-Allow-Origin header value r=dragana
StripWhitespace() is not suitable for HTTP whitespace trimming.

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

--HG--
extra : moz-landing-system : lando
2018-11-08 13:14:43 +00:00
Daniel Stenberg
8da710e1bf bug 1503517 - do not strip 0x0c from X-Content-Type-Options header fields r=dragana
The nsCSstring's StripWhitespace() method is not very HTTP "friendly".

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

--HG--
extra : moz-landing-system : lando
2018-11-08 11:30:13 +00:00
Nicholas Hurley
bbe78e41bf Bug 1505388 - fix crash introduced by bug Bug 1434137. r=kershaw
Differential Revision: https://phabricator.services.mozilla.com/D11184

--HG--
extra : moz-landing-system : lando
2018-11-07 16:52:57 +00:00
Nicholas Hurley
27190f4a59 Bug 1434137 - Implement websockets over http/2 - RFC 8441 r=michal,dragana
https://tools.ietf.org/html/rfc8441

This uses our existing http/2 CONNECT infrastructure (modified) to
enable the new extended CONNECT form defined by 8441, and pretend for
the websocket's sake that an http/2 stream is actually a socket. From
the websocket's point of view, this is relatively non-invasive - a few
things have changed (http response code, absence of some headers) versus
http/1.1 websockets, but for the most part, the websocket code doesn't
care.

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

--HG--
extra : moz-landing-system : lando
2018-11-06 19:29:57 +00:00
Junior Hsu
3986ef8afc Bug 1277496 - use nsHttp::Origin instead of literal cstring r=francois
Differential Revision: https://phabricator.services.mozilla.com/D10752

--HG--
extra : moz-landing-system : lando
2018-11-05 21:40:36 +00:00
Brindusan Cristian
350fbdf6f5 Backed out 2 changesets (bug 1501503) as requested by bradwerth on the ticket.
Backed out changeset 814414676c25 (bug 1501503)
Backed out changeset c2d9f82adf43 (bug 1501503)
2018-11-03 15:03:29 +02:00
Ciure Andrei
83010e5db0 Merge inbound to mozilla-central. a=merge 2018-11-02 18:44:43 +02:00
Honza Bambas
f9a8f6aba1 Bug 1502055 - Make nsHttpChannel::ResumeInternal keep order of transaction pump OnStopRequest before cache pump OnStartRequest, r=dragana
--HG--
extra : histedit_source : a578146bb50df79f060e341fe9a2fa8be8224aa0
2018-10-31 05:36:00 +02:00
Ehsan Akhgari
164805ba94 Bug 1502774 - Part 2: Remove XPCOM component registrations for auth module classes r=valentin
Depends on D10025

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

--HG--
extra : moz-landing-system : lando
2018-11-01 10:39:58 +00:00
Ehsan Akhgari
001d26e9ea Bug 1502774 - Part 1: Remove XPCOM component registrations for HTTP authenticator classes r=valentin
Differential Revision: https://phabricator.services.mozilla.com/D10025

--HG--
extra : moz-landing-system : lando
2018-11-01 14:21:47 +00:00
Michael Kohler
a2423373a9 Bug 1501621 - Enable ESLint for netwerk/dns/ and netwerk/protocol/ (manual changes) r=dragana,Standard8
Depends on D10590

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

--HG--
extra : moz-landing-system : lando
2018-11-02 10:38:14 +00:00
Michael Kohler
d7204e528f Bug 1501621 - Enable ESLint for netwerk/dns/ and netwerk/protocol/ (automatic changes) r=dragana,Standard8
Differential Revision: https://phabricator.services.mozilla.com/D10590

--HG--
extra : moz-landing-system : lando
2018-11-02 10:38:01 +00:00
Brad Werth
d2f14e17cc Bug 1501503: Report cross-origin load failures in more cases. r=ckerschb
Differential Revision: https://phabricator.services.mozilla.com/D9807

--HG--
extra : moz-landing-system : lando
2018-10-31 18:56:10 +00:00
Kershaw Chang
070976655b Bug 1484947 - Close the transaction if PR_Read/PR_Write failed, r=nwgh
When PR_Read/PR_White returns -1, we have to use ErrorAccordingToNSPR to get the error code. We need to close the transaction if the real error happens.

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

--HG--
extra : moz-landing-system : lando
2018-10-31 09:32:40 +00:00
Kershaw Chang
fc9640b527 Bug 1496422 - Use top level content window id if the request's window id is not available r=mayhemer
The inner window id here is used to log the error message to the right web console.
So, top level content window id should work properly if we can't get the inner window id directly from the request.

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

--HG--
extra : moz-landing-system : lando
2018-10-30 17:11:17 +00:00
Ciure Andrei
57619c2e49 Merge autoland to mozilla-central. a=merge 2018-10-31 00:04:23 +02:00
Andreea Pavel
3770da1a92 Backed out 3 changesets (bug 1502774) for causing multiple crashes - bug 1503201 a=backout
Backed out changeset 6b821f5b12ae (bug 1502774)
Backed out changeset b3bf57d996a7 (bug 1502774)
Backed out changeset 32a581482291 (bug 1502774)

--HG--
rename : extensions/auth/nsIAuthModule.cpp => extensions/auth/nsAuthFactory.cpp
2018-10-30 21:18:29 +02:00
Dragana Damjanovic
dd7c87fd1f Bug 1503011 - Make sure DNSPrefetch is called. r=mayhemer
Differential Revision: https://phabricator.services.mozilla.com/D10118

--HG--
extra : moz-landing-system : lando
2018-10-30 10:27:28 +00:00
Ehsan Akhgari
5fef8e924c Bug 1501978 - Part 1: Stop honouring the browser.contentblocking.enabled pref in Gecko r=baku
Differential Revision: https://phabricator.services.mozilla.com/D10074

--HG--
extra : moz-landing-system : lando
2018-10-30 14:30:15 +00:00
Ehsan Akhgari
51908697bd Bug 1502774 - Part 2: Remove XPCOM component registrations for auth module classes r=valentin
Depends on D10025

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

--HG--
extra : moz-landing-system : lando
2018-10-29 14:59:16 +00:00
Ehsan Akhgari
a064a33bed Bug 1502774 - Part 1: Remove XPCOM component registrations for HTTP authenticator classes r=valentin
Differential Revision: https://phabricator.services.mozilla.com/D10025

--HG--
extra : moz-landing-system : lando
2018-10-29 14:59:14 +00:00
Narcis Beleuzu
3467484554 Backed out 3 changesets (bug 1502774) for mingwclang bustages on include/sspi.h. CLOSED TREE
Backed out changeset a1f9c4666855 (bug 1502774)
Backed out changeset 07648e9d8400 (bug 1502774)
Backed out changeset b403c3c786ee (bug 1502774)

--HG--
rename : extensions/auth/nsIAuthModule.cpp => extensions/auth/nsAuthFactory.cpp
2018-10-29 17:01:21 +02:00
Ehsan Akhgari
acc9a12f81 Bug 1502774 - Part 2: Remove XPCOM component registrations for auth module classes r=valentin
Depends on D10025

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

--HG--
extra : moz-landing-system : lando
2018-10-29 14:40:29 +00:00
Ehsan Akhgari
7a780d8462 Bug 1502774 - Part 1: Remove XPCOM component registrations for HTTP authenticator classes r=valentin
Differential Revision: https://phabricator.services.mozilla.com/D10025

--HG--
extra : moz-landing-system : lando
2018-10-29 14:40:29 +00:00
Tom Ritter
8b356d2846 Bug 1432429 - Create a DelayHttpChannelQueue class to queue network requests until FuzzyFox indicates they should fire. r=mayhemer,baku 2018-09-18 13:05:54 -05:00
Paul Vitale
7130c59eb7 Bug 1477592 - Prevent TCP connection for CONNECT-only HTTP channel with non-http proxy r=dragana
This moves the check for a non-http proxy from the socket transport callbacks in
nsHttpConnection to nsHttpChannel before the connection occurs.

MozReview-Commit-ID: CJIozDInXWz
2018-07-22 14:04:07 -05:00
Paul Vitale
2966b99504 Bug 1203503 - part 1. change necko to allow CONNECT-only requests r+mayhemer
Necko does not allow for a CONNECT only request to happen.  This adds a flag
to signal an http channel should only CONNECT if proxied.  This flag can only be
set if an HTTPUpgrade handler has been assigned.  As proposed by rfc7639, an
alpn header will be included in the CONNECT request.  Its value is determined by
the upgrade protocol passed to HTTPUpgrade.

The flag is added as part of nsIHttpChannelInternal because it is dependent on
HTTPUpgrade.  It exists as a capability flag since the channel's transaction
needs to know to complete after a successful CONNECT.  Also the transaction's
connection needs to know to stop writing transaction data after it CONNECTs or
if there's no proxy, and to not tell the transaction to reset.

If an nsHttpChannel has this flag set then the upgrade handler will receive the
socket after the CONNECT succeeds without doing tls if https.

In order to support xpcshell-test for this change, nsHttpConnectionMgr does a
little check to see if HTTPUpgrade callback is in JavaScript.  If it is then
the callback is invoked on the main thread.

--HG--
extra : rebase_source : 96cdfe0e1ffe2f7dad7d12c83c22be92d118195a
extra : intermediate-source : 70710e9bf3d98488485c3265ebdea09683a42a80
extra : source : 25b4b531c10c4b2dae416fd7d744a63a32fed7e5
2018-07-19 11:41:57 -05:00
Nicholas Hurley
7ce9475d3c Bug 1496611 - Send NO_ERROR when closing h2 session at shutdown. r=dragana
Previously, we were sending INTERNAL_ERROR, but that's not really true. Firefox hasn't hit an error, we're just shutting down. It makes more sense to tell the peer we're not messed up, just going away nicely.

Depends on D8437

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

--HG--
extra : moz-landing-system : lando
2018-10-25 20:47:19 +00:00
Nicholas Hurley
a2d8c9ef38 Bug 1355858 - Blacklist hosts from spdy who are very poorly behaved. r=dragana
In certain cases (such as the case from bug 1050329, where a server claims to speak h2, but really doesn't), we will end up trying every connection to that server as h2 before falling back to http/1.1. Once we know a server is very badly behaved, it doesn't make sense to keep trying h2 (at least for the current browsing session). This adds an in-memory blacklist of origins & conninfos to not try h2 on, so we don't waste round trips trying h2, failing, and then dialing back with http/1.1 except for the first connection to an origin.

Depends on D8436

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

--HG--
extra : moz-landing-system : lando
2018-10-25 20:52:59 +00:00
Nicholas Hurley
2319ff8d81 Bug 1050329 - part 2 - Add error page for h2 goaway. r=dragana,bzbarsky
This is kind of like the previous patch (where we had a not-very-friendly user experience shutting down misbehaving h2 sessions), but in this case the server has proven to us that it can speak a minimum of h2, so we don't want to just fallback. Instead, when we send a GOAWAY frame because we have detected some error on the part of the server, if it's a top-level page load, we'll show an error page explaining that the server spoke bad http/2, and the site admin(s) need to be contacted. We already did this for INADEQUATE_SECURITY (which is its own special case still), but that didn't cover all the cases.

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

--HG--
extra : moz-landing-system : lando
2018-10-25 20:46:46 +00:00
Nicholas Hurley
669d078042 Bug 1050329 - part 1 - Re-start transactions on totally busted h2 sessions. r=francois,dragana
Previously, we would just let these fail. But, when a peer claims to speak h2 via ALPN, and then plainly doesn't speak h2 (by not doing the opening handshake properly), we should re-try any transactions dispatched to that session using http/1.1 only. No use in giving the user a horrible experience. We will also collect telemetry on how often we have sessions where this happens, so we can see how big of a problem this is (and thus if we need to do any kind of outreach).

Depends on D8432

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

--HG--
extra : moz-landing-system : lando
2018-10-25 20:46:24 +00:00
Nicholas Hurley
1bbb1ab938 Bug 1050329 - (prereq) Make RETURN_SESSION_ERROR a method. r=dragana
Previously this was a macro, but in later patches in this series, I want to make the macro a bit smarter. There's no particular need to have it as a macro (and macros that return from functions are often considered no-nos), so this makes it a method on the session, instead.

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

--HG--
extra : moz-landing-system : lando
2018-10-25 20:46:01 +00:00
Andrea Marchesini
c78617e1a8 Bug 1499995 - part 2 - TrackingDummyChannel must expose nsIHttpChannelInternal, r=ehsan, r=mayhemer 2018-10-25 10:44:12 +02:00
Junior Hsu
ced59fc1ad Bug 1498434 - add new telemetry probe to know the delay caused by e10s back pressure r=valentin
a straight forward implementation

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

--HG--
extra : moz-landing-system : lando
2018-10-23 22:17:22 +00:00
Junior Hsu
8f2bbcfceb Bug 1487559 - add new telemetry probe for the mime type causing suspension for back pressure r=francois,valentin
Differential Revision: https://phabricator.services.mozilla.com/D4729

--HG--
extra : moz-landing-system : lando
2018-10-24 16:26:19 +00:00
Ehsan Akhgari
229b1144b8 Bug 1501404 - Part 5: Remove the XPCOM registration for nsSocketProviderService r=valentin
Depends on D9573

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

--HG--
extra : moz-landing-system : lando
2018-10-23 20:07:25 +00:00
Ehsan Akhgari
e6c5cd6e52 Bug 1501404 - Part 1: Remove the XPCOM registration for RequestContextService r=valentin
Differential Revision: https://phabricator.services.mozilla.com/D9570

--HG--
extra : moz-landing-system : lando
2018-10-23 20:07:17 +00:00
Andrea Marchesini
4ebf5b4364 Bug 1496581 - Split nsISeekableStream in 2 classes: nsISeekableStream and nsITellableStream, f=mayhemer, r=froydnj
In the current code there are 3 main issues:

1. nsFileStream is not really thread-safe. There is nothing to protect the
internal members and we see crashes.

2. nsPipeInputStream doesn't implement ::Seek() method and that caused issues
in devtools when a nsHttpChannel sends POST data using a pipe. In order to fix
this, bug 1494176 added a check in nsHttpChannel: if the stream doesn't
implement ::Seek(), let's clone it. This was an hack around nsPipeInputStream,
and it's bad.

3. When nsHttpChannel sends POST data using a file stream, nsFileStream does
I/O on main-thread because of the issue 2. Plus, ::Seek() is called on the
main-thread causing issue 1.

Note that nsPipeInputStream implements only ::Tell(), of the nsISeekableStream
methods. It doesn't implement ::Seek() and it doesn't implement ::SetEOF().

With this patch I want to fix point 2 and point 3 (and consequentially issue 1
- but we need a separate fix for it - follow up). The patch does:

1. it splits nsISeekableStream in 2 interfaces: nsITellableStream and
nsISeekableStream.
2. nsPipeInputStream implements only nsITellableStream.  Doing this, we don't
need the ::Seek() check for point 2 in nsHttpChannel: a simple QI check is
enough.
3. Because we don't call ::Seek() in nsHttpChannel, nsFileStream doesn't do I/O
on the main-thread, and we don't crash doing so.
2018-10-18 13:35:35 +02:00
Valentin Gosu
055117366d Bug 1487100 - Allow opening the input stream for original content when alt-data is available r=michal,luke
In trying to use fetch with alt-data, we sometimes want the benefit of using alt-data but the JS consumer actually needs to use the original HTTP response from the server.
To get around this problem, we introduce a new API - nsICacheInfoChannel.getOriginalInputStream(nsIInputStreamReceiver) that asyncly receives the input stream containing the HTTP response in the cache entry.

Depends on D8071

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

--HG--
extra : rebase_source : 43d92c631b964c52b551a700b0954276e91695d6
extra : source : 7f9d03c29a6ffd82c1b5e17c14e27a2ae9d64434
2018-10-17 12:27:37 +00:00
Valentin Gosu
5ac68030f7 Bug 1487100 - Allow calling nsICacheInfoChannel.preferAlternativeDataType(altDataType, contentType) multiple times r=michal,luke
This patch changes the way we set and handle the preferred alternate data type.
It is no longer just one choice, but a set of preferences, each conditional
on the contentType of the resource.

For example:
  var cc = chan.QueryInterface(Ci.nsICacheInfoChannel);
  cc.preferAlternativeDataType("js-bytecode", "text/javascript");
  cc.preferAlternativeDataType("ammended-text", "text/plain");
  cc.preferAlternativeDataType("something-else", "");

When loaded from the cache, the available alt-data type will be checked against
"js-bytecode" if the contentType is "text/javascript", "ammended-text" if the contentType is "text/plain" or "something-else" for all contentTypes.
Note that the alt-data type could be "something-else" even if the contentType is "text/javascript".

The preferences are saved as an nsTArray<mozilla::Tuple<nsCString, nsCString>>.

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

--HG--
extra : rebase_source : eb4961f05a52e557e7d2d986d59e0a2cf18a3447
extra : source : dd1c31ea78c2b15d14750d137037a54d50719997
2018-10-17 13:58:30 +00:00
Dorel Luca
1a48c88d19 Backed out 2 changesets (bug 1487100) for XPCShell failures in netwerk/test/unit_ipc/test_alt-data_simple_wrap.js
Backed out changeset 7f9d03c29a6f (bug 1487100)
Backed out changeset dd1c31ea78c2 (bug 1487100)
2018-10-18 05:51:42 +03:00
Valentin Gosu
324f3ccf9b Bug 1487100 - Allow opening the input stream for original content when alt-data is available r=michal,luke
In trying to use fetch with alt-data, we sometimes want the benefit of using alt-data but the JS consumer actually needs to use the original HTTP response from the server.
To get around this problem, we introduce a new API - nsICacheInfoChannel.getOriginalInputStream(nsIInputStreamReceiver) that asyncly receives the input stream containing the HTTP response in the cache entry.

Depends on D8071

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

--HG--
extra : moz-landing-system : lando
2018-10-17 12:27:37 +00:00
Valentin Gosu
e392dbc5dd Bug 1487100 - Allow calling nsICacheInfoChannel.preferAlternativeDataType(altDataType, contentType) multiple times r=michal,luke
This patch changes the way we set and handle the preferred alternate data type.
It is no longer just one choice, but a set of preferences, each conditional
on the contentType of the resource.

For example:
  var cc = chan.QueryInterface(Ci.nsICacheInfoChannel);
  cc.preferAlternativeDataType("js-bytecode", "text/javascript");
  cc.preferAlternativeDataType("ammended-text", "text/plain");
  cc.preferAlternativeDataType("something-else", "");

When loaded from the cache, the available alt-data type will be checked against
"js-bytecode" if the contentType is "text/javascript", "ammended-text" if the contentType is "text/plain" or "something-else" for all contentTypes.
Note that the alt-data type could be "something-else" even if the contentType is "text/javascript".

The preferences are saved as an nsTArray<mozilla::Tuple<nsCString, nsCString>>.

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

--HG--
extra : moz-landing-system : lando
2018-10-17 13:58:30 +00:00
Nicholas Hurley
89b6e4de4b Bug 1499149 - Better telemetry for alt-svc headers seen in the wild. r=francois,valentin
Right now, we have no idea how often an origin may offer us multiple alt-svc options. As we are considering racing multiple alt-svc connections (if they're available), it would be good to know how often we actually have (or would have, were we to store them) multiple options available. It would also be good to know how often an origin may change the target of its alt-svc mapping (even if there is only one target), as changes in target may make it useful to store/race multiple targets, as well.

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

--HG--
extra : moz-landing-system : lando
2018-10-17 18:14:56 +00:00
Nicholas Hurley
2a0345cbb3 Bug 1493724 - Don't overwrite still-valid altsvc mappings until a new one is validated. r=valentin
Right now, as soon as we receive an alt-svc header or frame for an origin, we will overwrite any mapping we already have for that origin, even if it's still valid. This means that, should validation fail for the new mapping, we will have blown away a perfectly usable alt-svc mapping for no good reason. This patch prevents us from overwriting until we know the new mapping is good.

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

--HG--
extra : moz-landing-system : lando
2018-10-15 21:52:04 +00:00
Thomas Wisniewski
ddc2cf9606 Bug 1496577 - have OPTIONS preflights inherit the original request's referrer and referrer policy; r=ckerschb
OPTIONS preflights inherit the original request's referrer and referrer policy

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

--HG--
extra : moz-landing-system : lando
2018-10-12 20:05:10 +00:00
Sylvestre Ledru
dd5741407b Bug 1498586 - Add clang-format off to avoid the reformatting of the data structures r=Ehsan
Too hard/impossible for the tool to format correctly these structs

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

--HG--
extra : moz-landing-system : lando
2018-10-12 20:48:24 +00:00
Andrea Marchesini
dc8ad03720 Bug 1495285 - Introduce TrackingDummyChannel to annotate channels before being intercepted by ServiceWorkers, r=francois, r=mayhemer, f=asuth 2018-10-12 11:40:36 +02:00
Chris Peterson
e70234b350 Bug 583181 - Part 2: Add separate definitions for LEGACY_BUILD_ID and LEGACY_UA_GECKO_TRAIL. r=hsivonen
"Gecko trail" is the term used by MDN [1] for the YYYMMDD build date in the UA string's "Gecko/" token. Build ID is a YYYYMMDDHHMMSS build timestamp. Use LEGACY_BUILD_ID to spoof navigator.buildID. Use LEGACY_UA_GECKO_TRAIL to construct the UA string.

[1] https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/User-Agent/Firefox

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

--HG--
extra : rebase_source : e2a4d7579d419046f0bad6290078f9a652a770d8
extra : source : 8a26c8598528722a8920513c7fdfea40aefe0dbc
2018-10-01 21:27:34 -07:00
Jonathan Kingston
d8f6d455e1 Bug 1461930 - Replace use of speculativeConnect methods for variants that pass a triggeringPrincipal. r=ckerschb
Differential Revision: https://phabricator.services.mozilla.com/D7701

--HG--
extra : moz-landing-system : lando
2018-10-05 13:42:37 +00:00
Nicholas Hurley
9c55ffd196 Bug 1492524. r=dragana
Differential Revision: https://phabricator.services.mozilla.com/D6946

--HG--
extra : rebase_source : bfbdf5f73d83d6c0465a58fc1f9eb4018a308d78
2018-10-08 06:44:42 -04:00
Junior Hsu
fe777f8462 Bug 1494133 - know how many localhosts suspended by e10s back pressure r=valentin
Differential Revision: https://phabricator.services.mozilla.com/D7142

--HG--
extra : moz-landing-system : lando
2018-10-05 21:40:23 +00:00
Csoregi Natalia
9d55d83f31 Merge inbound to mozilla-central. a=merge 2018-10-05 01:29:38 +03:00
Honza Bambas
aba7b477ef Bug 1494376 - Log ~HttpChannelParentListener, r=nwgh 2018-10-04 04:48:00 +03:00
Nicholas Hurley
dad8d53ed9 Bug 1496224 - Followup to 1409570 - fix clang-tidy complaint r=bagder
Differential Revision: https://phabricator.services.mozilla.com/D7652

--HG--
extra : moz-landing-system : lando
2018-10-04 08:43:54 +00:00
Noemi Erli
8bb8254a13 Merge inbound to mozilla-central. a=merge 2018-10-04 07:03:25 +03:00
Nicholas Hurley
44ca650a2b Bug 1493204 - Add pushed streams to the priority tree. r=dragana
Previously, we had not put pushed streams in the priority tree, we just
let them be top-level items in the tree. With this change, we will put
them into the tree initially based on the priority of the associated
stream. The only exception is if the associated stream is either a
Leader or Urgent Start (in which case, we will turn the pushed streams
into followers).

Once the pushed stream is matched with a request generated by gecko,
that pushed stream will be re-prioritized based on the priority gecko
has for the request, just like a regular pulled stream.

This also allows us to re-prioritize pushed streams into the background
on tab switch (we assume that, before they are matched, they belong to
the same window as the associated stream).

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

--HG--
extra : moz-landing-system : lando
2018-10-03 09:40:23 +00:00
Gurzau Raul
ede1418858 Merge mozilla-central to inbound. a=merge CLOSED TREE 2018-10-02 19:08:39 +03:00
Andrew McCreight
837f0af066 Bug 1493737 - Fix many trivial calls to do_QueryInterface r=smaug
If class A is derived from class B, then an instance of class A can be
converted to B via a static cast, so a slower QI is not needed.

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

--HG--
extra : moz-landing-system : lando
2018-10-01 21:38:01 +00:00
Nicholas Hurley
a3fcc3c708 Bug 1409570 - Ensure that transactions matched with http/2 pushed streams are properly finished. r=bagder
There was an earlier fix to this, that fixed part of the issue, but that
fix was racy. In the case where the transaction was matched with the
pushed stream before the pushed stream received its END_STREAM, and the
response headers did not include a content-length, the transaction would
never notice that the data was done being sent. When that transaction
was necessary for the load event to fire, the page would get stuck in
the loading state until the user explicitly cancelled.

This new patch ensures that the transaction will notice the EOS by
making sure the pushed stream gets inserted into the list of push
streams with data in the case described above. (The previous patch,
which is still in the tree, is still necessary, but not sufficient, to
fix the issue.)

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

--HG--
extra : moz-landing-system : lando
2018-10-01 21:52:57 +00:00
Honza Bambas
2e4f8908ef Bug 1495180 - Add linking LOG to Http2PushedStream::SetConsumerStream. r=nwgh 2018-09-29 01:10:00 +03:00
Francois Marier
eb27c3267c Bug 1488974 - Disable FastBlock after the load event has fired. r=mayhemer,Ehsan
The test used to assume that the load event didn't matter and so
the expected values had to be updated to match the new behavior.

A new "slowIFrame" test was added to capture what was previously
tested by the "badIFrame".

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

--HG--
extra : moz-landing-system : lando
2018-09-28 19:12:10 +00:00
Gijs Kruitbosch
76afb51661 Bug 1493655 - make nsISecureBrowserUI initialize from a docshell instead of a window, r=keeler,nika
This also removes the (afaict, unused) stub implementation from TabParent. The netwerk header
inclusions were necessary because those files included TabParent.h and through it,
nsISecureBrowserUI, but now TabParent.h no longer does that.

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

--HG--
extra : moz-landing-system : lando
2018-09-26 17:48:38 +00:00
Ehsan Akhgari
94133b9360 Bug 1488305 - Remove the XPCOM component registration for BackgroundChannelRegistrar r=nwgh
Differential Revision: https://phabricator.services.mozilla.com/D4893

--HG--
extra : moz-landing-system : lando
2018-09-26 00:27:32 +00:00
Henri Sivonen
3a8d018880 Bug 1487398 - Remove useless use of SetCapacity(). r=froydnj,nwgh
Remove various calls to SetCapacity() that fall into various misuse categories:

 1) Mistakenly believing that the caller should advice the string about zero
    terminator.
 2) Cases where a single append does the right computation on its own.
 3) Calling SetCapacity() with a constant when the string is self-allocated
    and could be an nsAuto[C]StringN and the string doesn't get passed on
    in a way that could benefit from a heap-allocated buffer.
 4) Calling SetCapacity() before assigning a shared buffer to the string.
 5) Calling SetCapacity() before calling a function that will either calls
    SetLength() anyway or calls Adopt().

MozReview-Commit-ID: IKjfl5gLmcD

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

--HG--
extra : moz-landing-system : lando
2018-09-25 15:36:31 +00:00
Kershaw Chang
dc8eeee6b9 Bug 1490235 - Use nsDependentCSubstring in AltDataOutputStreamChild::WriteDataInChunks r=mayhemer
Simply replace the nsCString with nsDependentCSubstring to avoid copying the data. In this way, we can also avoid the potential OOM crash.

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

--HG--
extra : moz-landing-system : lando
2018-09-25 16:56:16 +00:00
Christoph Kerschbaumer
60e3239dee Bug 1490874: Log Principal based Security Errors to the Security pane in the console. r=smaug 2018-09-25 07:25:05 +02:00
Nicholas Hurley
d17d1224fd Bug 1492484 - Do not reprioritize pushed streams on tab switch. r=kershaw
Right now, pushed streams don't get put in the priority hierarchy
anyway, and with the code as it was, we were sending an illegal PRIORITY
frame for stream 0. This prevents that from happening. We should
probably think about putting pushed streams in the priority hierarchy at
some point.

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

--HG--
extra : moz-landing-system : lando
2018-09-24 15:16:22 +00:00
Dragana Damjanovic
9cadc84486 Bug 1473736 - Implement necko part of ESNI r=mak,kmag,mcmanus
--HG--
extra : rebase_source : be79870960953ef9535ccb6a440515ec4a8232d5
extra : histedit_source : 8096ab2eaf246cbbeb97bace0531b86b8c69ff66
2018-09-22 23:54:11 +03:00
Nathan Froyd
b500bde65b Bug 1492894 - part 2 - eliminate already_AddRefed variables in netwerk/; r=valentin
We need to disallow these to fix our static analysis, which should have
already been disallowing them.
2018-09-21 16:45:49 -04:00
Andrea Marchesini
165f1339fd Bug 1494176 - nsHttpChannel must clone the upload stream if it doesn't implement ::Seek(), r=mayhemer 2018-10-03 22:51:55 +02:00
Haik Aftandilian
7ab87f4f35 Bug 1443748 - Delete resolver on main thread. r=jld
--HG--
extra : rebase_source : ddf4e02da4807f4e457573de3fc55a21374445ee
2018-09-13 10:10:52 -07:00
Bogdan Tara
0a366c8ced Merge mozilla-central to autoland. a=merge CLOSED TREE 2018-09-20 07:15:43 +03:00
Ehsan Akhgari
bb5a089b38 Bug 1489624 - Ensure that the Necko cache will only be partitioned for third-party tracker resources r=mayhemer
Differential Revision: https://phabricator.services.mozilla.com/D6281

--HG--
extra : moz-landing-system : lando
2018-09-20 01:17:36 +00:00
Kris Maglione
c7df4b83d7 Bug 1486147: Follow-up: Fix missing QueryInterface entries. r=bustage
--HG--
extra : rebase_source : 4ab19b5145117f9c9aef87d8d59ad7ff923e299d
2018-09-19 17:34:10 -07:00
Randell Jesup
b880eea7c8 Bug 1490963: Make main-process network START markers match STOP markers r=mayhemer 2018-09-19 15:40:41 -04:00
Kris Maglione
31cf107646 Bug 1486147: Part 1 - Add JS iterator support to nsIStringEnumerator. r=mccr8
Differential Revision: https://phabricator.services.mozilla.com/D4269

--HG--
extra : rebase_source : 5fe9d4c7717d65e1bc8d45bdd89bcc5384c6d0ee
extra : histedit_source : e8f5606a192f13524996faf2e179d2c2e58c933f%2C725c8f145a1f4d34f84e6818b61ec5b955862e70
2018-08-24 16:21:33 -07:00
Ehsan Akhgari
d3787265b1 Bug 1489252 - Part 2: Add a telemetry probe for measuring the rate at which popular analytics providers get blocked by fastblock for top-level documents; r=baku,mayhemer,chutten data-r=liuche
Differential Revision: https://phabricator.services.mozilla.com/D5296
2018-09-14 16:06:07 -04:00
Ehsan Akhgari
2012a895a1 Bug 1489252 - Part 1: Move browser.fastblock.enabled to StaticPrefList.h; r=baku
Differential Revision: https://phabricator.services.mozilla.com/D5295
2018-09-14 16:06:07 -04:00
Chris Peterson
77fbb409c9 Bug 1490575 - netwerk: Remove #ifdef MOZ_MULET. r=dragana
Mulet was a Firefox OS simulator that is no longer supported: https://wiki.mozilla.org/Mulet

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

--HG--
extra : rebase_source : e6dd0146f4564e4ea8aa1ce4eaa78e1cfeb421b2
extra : source : 9e3cd534394c0e08ad8fdaa46ac7559a66a09a6b
2018-09-11 23:09:09 -07:00
Dana Keeler
364a010e05 bug 748809 - remove nsIAssociatedContentSecurity and nsISecurityInfoProvider r=mayhemer,jrmuizel
nsIAssociatedContentSecurity and nsISecurityInfoProvider are unused as of
bug 832834, so this patch removes them.

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

--HG--
extra : moz-landing-system : lando
2018-09-13 17:13:43 +00:00
Liang-Heng Chen
ac54284832 Bug 1477046 - Part 1: Add basic FastBlock automation tests; r=mayhemer
Basic parts of FastBlock tests, no iframe/xhr tests in this patch.

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

--HG--
extra : moz-landing-system : lando
2018-09-13 21:27:54 +00:00
Andreea Pavel
c5abbc4085 Backed out changeset d965284aca14 (bug 1477046) for failing toolkit/components/url-classifier/tests/mochitest/test_fastblock_bug1477046.htm 2018-09-13 19:31:32 +03:00
Daniel Stenberg
f55cab35f3 bug 1486137 - fix the stream ID check when counting TRR streams r=nwgh
MozReview-Commit-ID: DzOu1dRlWtg

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

--HG--
extra : moz-landing-system : lando
2018-09-13 14:48:46 +00:00
Liang-Heng Chen
50f5257561 Bug 1477046 - Part 1: Add basic FastBlock automation tests; r=mayhemer
Basic parts of FastBlock tests, no iframe/xhr tests in this patch.

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

--HG--
extra : moz-landing-system : lando
2018-09-13 15:07:07 +00:00
Andreea Pavel
687137ac36 Backed out 2 changesets (bug 1477046) for failing eslint on a CLOSED TREE
Backed out changeset dcbe562ce87a (bug 1477046)
Backed out changeset 757bbd2e3176 (bug 1477046)
2018-09-13 15:22:19 +03:00
Liang-Heng Chen
e8e0348d20 Bug 1477046 - Part 1: Add basic FastBlock automation tests; r=mayhemer
Basic parts of FastBlock tests, no iframe/xhr tests in this patch.

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

--HG--
extra : moz-landing-system : lando
2018-09-13 12:03:41 +00:00
Francois Marier
947b258b04 Bug 1488951 - Put a limit on how long FastBlock runs. r=mayhemer,Ehsan. CLOSED TREE
Differential Revision: https://phabricator.services.mozilla.com/D5098

--HG--
extra : source : e97cfb1a3f88d0e76e4dfd665aa5f7713881558a
extra : amend_source : 905f3af0cf7a94014d41734f66eea4bfc2c5e15e
2018-09-11 18:17:12 +00:00
Narcis Beleuzu
3c3da81ebc Backed out changeset e97cfb1a3f88 (bug 1488951) by bhearsum`s request. 2018-09-11 22:01:36 +03:00
Francois Marier
e1f72beb97 Bug 1488951 - Put a limit on how long FastBlock runs. r=mayhemer,Ehsan
Differential Revision: https://phabricator.services.mozilla.com/D5098

--HG--
extra : moz-landing-system : lando
2018-09-11 18:17:12 +00:00
Honza Bambas
7ca705dba4 Bug 1488039 - Don't log cancelled CORS requests as errors, r=ckerschb
Differential Revision: https://phabricator.services.mozilla.com/D4855

--HG--
extra : moz-landing-system : lando
2018-09-04 11:20:57 +00:00
Dipen Patel
aeed887ff8 Bug 1468222 Consolidate nsISSLStatus info nsITransportSecurityInfo r=Gijs,snorp,jcj,mcmanus,sfraser,keeler,baku,ato
Move all fields of nsISSLStatus to nsITransportSecurityProvider
Remove nsISSLStatus interface and definition
Update all code and test references to nsISSLStatus
Maintain ability to read in older version of serialized nsISSLStatus.  This
is verified with psm_DeserializeCert gtest.

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

--HG--
extra : moz-landing-system : lando
2018-09-11 00:07:30 +00:00
Daniel Varga
9e7995b3c3 Merge mozilla-inbound to mozilla-central. a=merge 2018-09-10 19:14:55 +03:00