Commit Graph

16804 Commits

Author SHA1 Message Date
Cosmin Sabou
6a034485b2 Merge mozilla-inbound to mozilla-central. a=merge 2018-10-27 00:55:47 +03:00
Valentin Gosu
e64bd3c823 Bug 1500594 - Retry reading stream if it returns NS_BASE_STREAM_WOULD_BLOCK r=kershaw
Sometimes nsIBinaryInputStream.readByteArray could return NS_BASE_STREAM_WOULD_BLOCK.
In this case we want to retry reading from the input stream.

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

--HG--
extra : moz-landing-system : lando
2018-10-26 12:28:56 +00:00
Daniel Stenberg
bfe78e05d2 bug 1502273 - improve the LOAD_FRESH_CONNECTION description r=dragana
MozReview-Commit-ID: 4y5SkKkK64r

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

--HG--
extra : moz-landing-system : lando
2018-10-26 12:18:28 +00:00
Byron Campen [:bwc]
41541e64f6 Bug 1494301: Single API for mtransport. r=mjf
Differential Revision: https://phabricator.services.mozilla.com/D7212

--HG--
extra : moz-landing-system : lando
2018-10-26 00:39:07 +00:00
Junior Hsu
7dd4276f45 Bug 1499138 - Do not nullify the gSocketThread in shutdown phase r=valentin
Differential Revision: https://phabricator.services.mozilla.com/D9740

--HG--
extra : moz-landing-system : lando
2018-10-25 20:10:20 +00: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
Coroiu Cristina
feba378b98 Backed out 2 changesets (bug 1460537) for xpcshell failures at netwerk/test/unit/test_network_connectivity_service.js on a CLOSED TREE
Backed out changeset ae2b0a2cd8a7 (bug 1460537)
Backed out changeset bd3f7151c697 (bug 1460537)
2018-10-25 20:16:10 +03:00
Daniel Varga
c1fea8cbed Merge mozilla-central to autoland. a=merge 2018-10-25 19:18:54 +03:00
Valentin Gosu
0774dd10ce Bug 1460537 - Connectivity Service - Add check for IPv4/v6 connectivity r=dragana
This is likely not the best approach to detecting IP connectivity.
The check has a slight delay until the failure counter reaches the threshold.
A more reliable way will be added in a follow-up.

Depends on D7844

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

--HG--
extra : moz-landing-system : lando
2018-10-25 15:49:08 +00:00
Valentin Gosu
23793b33e1 Bug 1460537 - Connectivity Service - Add DNSv4 and DNSv6 checks r=dragana
Differential Revision: https://phabricator.services.mozilla.com/D7844

--HG--
extra : moz-landing-system : lando
2018-10-25 15:48:51 +00:00
Thomas Nguyen
59d59ec231 Bug 1501206 - Introduce a new function ReferrerPolicyToString() r=ckerschb
We may need this function to convert ReferrerPolicy enum to string then
we can display referrer policy applied to a request.

MozReview-Commit-ID: B3xPAiykcOV

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

--HG--
extra : moz-landing-system : lando
2018-10-25 13:53:21 +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
Andrea Marchesini
efb6992ab2 Bug 1499995 - part 1 - LoadInfo must expose the correct top-level-storage-area-principal for sub documents, r=ehsan 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
Mark Banner
a26105ff45 Bug 1501662 - Add more .eslintrc.js files for test directories (dom, modules, netwerk and parser). r=mossop
Differential Revision: https://phabricator.services.mozilla.com/D9661

--HG--
extra : moz-landing-system : lando
2018-10-24 19:11:17 +00:00
ffxbld
b260043af7 No Bug, mozilla-central repo-update HSTS HPKP remote-settings tld-suffixes - a=repo-update r=bagder,RyanVM
Differential Revision: https://phabricator.services.mozilla.com/D9534

--HG--
extra : moz-landing-system : lando
2018-10-23 20:24:21 +00:00
Daniel Stenberg
71f6f27866 bug 1501283 - for NS checks we don't have originSuffix r=valentin
This fixes the regression caused by bug 1500549.

MozReview-Commit-ID: 3VBvIbrEbDT

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

--HG--
extra : moz-landing-system : lando
2018-10-23 20:22:54 +00:00
Ehsan Akhgari
488ca4192a Bug 1501404 - Part 8: Remove the XPCOM registration for NamedPipeService r=valentin
Depends on D9576

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

--HG--
extra : moz-landing-system : lando
2018-10-23 20:07:31 +00:00
Ehsan Akhgari
d0ee7e43f9 Bug 1501404 - Part 7: Remove the XPCOM registration for nsSyncStreamListener r=valentin
Depends on D9575

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

--HG--
extra : moz-landing-system : lando
2018-10-23 20:07:29 +00:00
Ehsan Akhgari
f6b7bc0052 Bug 1501404 - Part 6: Remove the XPCOM registrations for socket provider classes r=valentin
Depends on D9574

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

--HG--
extra : moz-landing-system : lando
2018-10-23 20:07:27 +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
1c8e7af29d Bug 1501404 - Part 4: Remove the unused contract ID for nsIHttpPushListener r=valentin
Depends on D9572

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

--HG--
extra : moz-landing-system : lando
2018-10-23 20:07:23 +00:00
Ehsan Akhgari
c1fa5fcfa6 Bug 1501404 - Part 3: Remove the unused contract ID for nsIProxyAutoConfig r=valentin
Depends on D9571

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

--HG--
extra : moz-landing-system : lando
2018-10-23 20:07:21 +00:00
Ehsan Akhgari
245edc5053 Bug 1501404 - Part 2: Remove the XPCOM registration for nsRequestObserverProxy r=valentin
Depends on D9570

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

--HG--
extra : moz-landing-system : lando
2018-10-23 20:07:19 +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
James Lee
322311866d Bug 1423839 - Part 2: Enable ESLint for NetUtil.jsm and netwerk/cookie/test/unit/ (manual changes) r=Standard8,jdm
Depends on D9293.

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

--HG--
extra : moz-landing-system : lando
2018-10-22 23:42:48 +00:00
James Lee
9204c97c31 Bug 1423839 - Part 1: Enable ESLint for NetUtil.jsm and netwerk/cookie/test/unit/ (automatic changes) r=Standard8,jdm
Ran ESLint's automatic '--fix' option on the above files.

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

--HG--
extra : moz-landing-system : lando
2018-10-23 08:34:13 +00:00
Margareta Eliza Balazs
a7f4d3ba4f Merge inbound to mozilla-central. a=merge 2018-10-23 12:27:03 +03:00
Andrea Marchesini
4439acd683 Bug 1498510 - Move nsICSPEventListener out of CSP object, r=ckerschb 2018-10-23 08:17:13 +02:00
Andrew McCreight
5c342e70f3 Bug 1497707, part 2 - The second argument to nsComponentManagerImpl::RegisterModule is always null. r=froydnj
This allows some code to be deleted, including a KnownModule ctor.

Depends on D8168

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

--HG--
extra : moz-landing-system : lando
2018-10-23 00:47:24 +00:00
Dorel Luca
c366888702 Backed out 2 changesets (bug 1423839) for xpcshell failures on netwerk/test/unit/test_NetUtil.js
Backed out changeset 501fffbf872d (bug 1423839)
Backed out changeset 406ca9722ffa (bug 1423839)
2018-10-23 00:49:18 +03:00
James Lee
3faf6a185f Bug 1423839 - Part 2: Enable ESLint for NetUtil.jsm and netwerk/cookie/test/unit/ (manual changes) r=Standard8,jdm
Depends on D9293.

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

--HG--
extra : moz-landing-system : lando
2018-10-22 19:41:58 +00:00
James Lee
d001a272ab Bug 1423839 - Part 1: Enable ESLint for NetUtil.jsm and netwerk/cookie/test/unit/ (automatic changes) r=Standard8,jdm
Ran ESLint's automatic '--fix' option on the above files.

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

--HG--
extra : moz-landing-system : lando
2018-10-22 19:41:33 +00:00
Daniel Stenberg
8e873c63fa bug 1500549 - make TRR Blacklist use originSuffix r=valentin
MozReview-Commit-ID: 5nOZefVlqRE

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

--HG--
extra : moz-landing-system : lando
2018-10-22 15:38:18 +00:00
Kershaw Chang
8d4d50662c Bug 1219935 - Skip OCSP request if PAC download is in progress r=keeler,bagder
This is a straightforward patch.
Just add a new attribute in nsIProtocolProxyService to indicate whether PAC is still loading. If yes, fail the OCSP request.

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

--HG--
extra : moz-landing-system : lando
2018-10-22 09:07:51 +00:00
Valentin Gosu
f0ea345598 Bug 1499917 - Read entire length of expected string from the stream r=michal
The test ocasionally fails out in e10s mode, because stream.available() might not return the entire string length (it's async). So the child process needs to wait for all of the bytes to be read.

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

--HG--
extra : moz-landing-system : lando
2018-10-19 18:00:50 +00:00
Martin Stransky
a4ef03261f Bug 1500366 - register all DBus connection to be handled by gmain loop, r=jhorak
Differential Revision: https://phabricator.services.mozilla.com/D9230

--HG--
extra : moz-landing-system : lando
2018-10-19 10:11:46 +00:00
Polly Shaw
5d0b11f38b Bug 1495024 - Firefox does not use exponential back-off after failing to load a PAC file. r=bagder
This patch addresses a bug introduced in the solution to Bug 356831, in which
the back-off time for reloading PAC files was set to the shortest interval every time a failure happened, thus auto-detecting PAC every 5 seconds
on a network on which WPAD did not resolve when the proxy was set to auto-detect.
The changes in this patch are:
 * nsPACMan.h - declares a private overload to LoadPACFromURI, with an
 additional parameter called aResetLoadFailureCount.
 * nsPACMan.cpp - moves the implementation of the old LoadPACFromURI to the new
 private overload, with the modification that the mLoadFailureCount field
 is only reset to 0 if aResetLoadFailureCount is true. Replaces the
 implementation of the public LoadPACFromURI with a call to the private overload
 with aResetLoadFailureCount = true. Also replaces the call made from within
 nsPACMan when triggering an internal reload with a call with
 aResetLoadFailureCount = false, thus ensuring that internally triggered reloads
 do not reset the back-off time.

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

--HG--
extra : moz-landing-system : lando
2018-10-19 09:13:16 +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
Daniel Stenberg
cf9e76636e bug 1498525 - make test_captive_portal_service use localhost only r=valentin
By setting network.dns.native-is-localhost in this test, it makes all native
name resolves use "localhost" and thus avoids causing an assert if this test
runs with TRR enabled and network.trr.uri set to point to an actual external
host name.

MozReview-Commit-ID: D1df6VtfckR

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

--HG--
extra : moz-landing-system : lando
2018-10-18 07:06:43 +00: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
Dorel Luca
88bfc3786c Backed out 5 changesets (bug 1497707) for android mass failures. CLOSED TREE
Backed out changeset bb1b80139e37 (bug 1497707)
Backed out changeset 11c813f192e2 (bug 1497707)
Backed out changeset 32595f9e73d3 (bug 1497707)
Backed out changeset f37f2d39ec9c (bug 1497707)
Backed out changeset 80bf9ddf5bed (bug 1497707)

--HG--
extra : rebase_source : 598b7732d9b994dfeb63c417841a4b9516ecdf19
2018-10-18 00:35:39 +03:00
Andrew McCreight
9f1dcc8dca Bug 1497707, part 2 - The second argument to nsComponentManagerImpl::RegisterModule is always null r=froydnj
This allows some code to be deleted, including a KnownModule ctor.

Depends on D8168

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

--HG--
extra : moz-landing-system : lando
2018-10-17 20:45:42 +00:00