Commit Graph

16771 Commits

Author SHA1 Message Date
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
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
Ehsan Akhgari
15457d3d7d Bug 1499549 - Ensure that we only check the corresponding Content Blocking exception list when testing whether a top-level document is on the Content Blocking allow list r=francois
Differential Revision: https://phabricator.services.mozilla.com/D8927

--HG--
extra : moz-landing-system : lando
2018-10-17 17:06:00 +00:00
Margareta Eliza Balazs
9cac5ce7af Backed out changeset a4b43a47589a (bug 1498782) for causing multimple failures e.g.: ts_paint_webext CLOSED TREE 2018-10-17 12:19:00 +03:00
Daniel Stenberg
f7c6799245 bug 1497438 - collect telemetry for TRR request success/time-out rate r=dragana
Introducing DNS_TRR_SUCCESS

MozReview-Commit-ID: Buz5nHEr8TK

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

--HG--
extra : moz-landing-system : lando
2018-10-17 07:59:43 +00:00
Valentin Gosu
411bafd8bb Bug 1498782 - Skip thread shutdown in nsHostResolver if there are still active threads after a delay r=bagder
Differential Revision: https://phabricator.services.mozilla.com/D8725

--HG--
extra : moz-landing-system : lando
2018-10-17 06:24:39 +00:00
Daniel Stenberg
d046fc457c bug 1497252 - Add DNS_TRR_FIRST2, with an added category r=dragana
How often is a successful (native) resolve delayed by a preceeding TRR
failure. (Replaces DNS_TRR_FIRST)

MozReview-Commit-ID: Da8oH53CZTs

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

--HG--
extra : moz-landing-system : lando
2018-10-17 06:34:08 +00:00
Nils Ohlmeier [:drno]
0576d8d43c Bug 1051685: increase SCTP window size from 128K to 1M. r=lgrahl
Differential Revision: https://phabricator.services.mozilla.com/D8906

--HG--
rename : dom/media/tests/mochitest/test_dataChannel_basicDataOnly.html => dom/media/tests/mochitest/test_dataChannel_dataOnlyBufferedAmountLow.html
extra : moz-landing-system : lando
2018-10-16 21:12:34 +00:00
Henri Sivonen
074a8bb5ea Bug 1460233 - Percent-encode ampersand and colon when replacing unmappable code points in URL query state. r=valentin
Spec change: https://github.com/whatwg/url/pull/386

MozReview-Commit-ID: Fa84kCNghtU

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

--HG--
extra : moz-landing-system : lando
2018-10-16 12:04:12 +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
Daniel Stenberg
1ce4e8a560 bug 1493619 - pad DNS entry grace period for low TTL cases r=dragana
MozReview-Commit-ID: 8AsmyaSYVJr

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

--HG--
extra : moz-landing-system : lando
2018-10-11 07:18:50 +00:00
Diego Pino Garcia
45377e5099 Bug 1481199 - Drop the obsolete dataType parameter for nsIBrowserSearchService.addEngine. r=mkaply 2018-10-09 13:39:35 +01: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
Narcis Beleuzu
b9b1c8ff17 Merge inbound to mozilla-central. a=merge 2018-10-04 18:48:04 +03:00
Michal Novotny
cc92ea3e92 Bug 1493278 - ChildDNSService::GetDNSRecordHashKey is doing unnecessary work. r=valentin
This fixes bug introduced by patch from bug 1337893. Serialized origin attributes suffix should be appended instead of rewriting the string.

--HG--
extra : rebase_source : a8ab785102e6e080f3038c1bd94f2b8b82404a55
2018-10-04 03:16:00 +03:00
Andrew McCreight
afe914f664 Bug 1495814 - Remove pointless do_QueryInterface() functions from nsBaseChannel.h r=mayhemer
The first QI is never used. The second one is the same as the one in
nsCOMPtr.h, so we should be able to call that instead, which can be
done simply by deleting the method. The motivation is that I'm
changing how do_QueryInterface works, and I'd like to avoid changing
this place given that it isn't actually needed.

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

--HG--
extra : moz-landing-system : lando
2018-10-04 10:53:21 +00:00
Valentin Gosu
bae0391620 Bug 1489229 - Return early from WPAD runnable when pref has been changed r=bagder
Bug 356831 added a release assert that when performing WPAD the network.proxy.type pref is always 4 (PROXYCONFIG_WPAD).
However, when changing the pref, the runnable is scheduled to run before the PAC thread is shutdown, so it will see the pref that is not PROXYCONFIG_WPAD, while attempting to do WPAD. To avoid this situation, we simply exit early when we detect the wrong pref value.

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

--HG--
extra : moz-landing-system : lando
2018-10-04 08:42:21 +00:00
Narcis Beleuzu
de85cdbfc7 Merge mozilla-central to autoland. CLOSED TREE 2018-10-04 18:58:42 +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
d6182ea83e Merge mozilla-central to autoland. a=merge CLOSED TREE 2018-10-04 07:10:05 +03:00
Noemi Erli
8bb8254a13 Merge inbound to mozilla-central. a=merge 2018-10-04 07:03:25 +03:00
Shane Caraveo
7a2b571838 Bug 1486819 move search engine specific logic into search service, r=mkaply
refactor some code into the search service.  This is necessary to
allow the searchservice to pull multiple locales or regions from a single
extension, based on data the searchservice maintains.

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

--HG--
extra : moz-landing-system : lando
2018-10-03 21:35:22 +00: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