Граф коммитов

1114 Коммитов

Автор SHA1 Сообщение Дата
Daniel Stenberg 144d65c4d6 bug 1446749 - make resolver keep TRR status when cherry-picking adddresses r=mcmanus
... as they otherwise appear in the about:networking list as "false"
while having been resolved by TRR.

MozReview-Commit-ID: 9g9fUExvyjS

--HG--
extra : rebase_source : 3098b7c3f7d01e55f5a8c031fc6a73e53f7edb05
2018-03-18 15:39:56 +01:00
Daniel Stenberg 75ba9a2870 bug 1446352 TRR: make "only mode" not wait for CP confirmation r=mcmanus
... to avoid a catch-22 as CP needs name resolve to work.

MozReview-Commit-ID: DC1CjlUy4cJ

--HG--
extra : rebase_source : 3bc0f146071f04757d44b76f352e48b2abb4dad0
2018-03-17 19:56:12 +01:00
Daniel Stenberg cc208144a3 bug 1445183 store TRR duration when the response is used r=valentin
Previously it would store the time even for early AAAA responses that
weren't used until the A response came in, thus getting the timing
wrong.

MozReview-Commit-ID: KctUjMjH5FR

--HG--
extra : rebase_source : fafd7ad25cd1b7a43d4b4a5653600cad830b471d
2018-03-13 10:37:50 +01:00
Daniel Stenberg c999b36f90 bug 1441131 - TRR: proxy storage removal to the mainthread r=valentin
MozReview-Commit-ID: K4Ar0RbSRzS

--HG--
extra : rebase_source : 6cefcc668f6004a59c09b065f2152250dbc83879
2018-03-12 15:57:13 +01:00
Daniel Stenberg de5b0bf154 bug 1444887 TRR: get captive portal state in init r=valentin
To prevent it from sitting waiting for an event that was sent before the
TRRService started.

MozReview-Commit-ID: 9F0IlWGdA9O

--HG--
extra : rebase_source : 6a70210a4e538d8a1b240684a0b3ed5fed38e6ad
2018-03-12 14:48:49 +01:00
Daniel Stenberg 51e2dbf071 bug 1444858 - TRR: respect network.dns.disableIPv6 r=valentin
MozReview-Commit-ID: 18STac9ASIB

--HG--
extra : rebase_source : e3e8956feee2ec9e4dfe438e1b6c20dc0c478ab9
2018-03-12 13:19:22 +01:00
Daniel Stenberg f0caae2f7c bug 1441391 - TRR: restart failed NS confirms in TRR-only mode r=valentin
MozReview-Commit-ID: FHw3Zx07iFG

--HG--
extra : rebase_source : 55a09920127aa54e542ed736b92ca6fda63f889c
2018-03-09 09:05:48 +01:00
Dorel Luca 150521bb4b Backed out changeset 798a47cd74d5 (bug 1441391) for build bustages. CLOSED TREE 2018-03-09 14:49:02 +02:00
Daniel Stenberg fd2336dfd3 bug 1441391 - TRR: restart failed NS confirms in TRR-only mode r=valentin
MozReview-Commit-ID: FHw3Zx07iFG

--HG--
extra : rebase_source : baa674f1a488c6ee5383a4f72c66bb595285db60
2018-03-09 09:05:48 +01:00
Daniel Stenberg 20d398643b bug 1441256 - bypass cache when retrying connection without TRR r=mcmanus,valentin
Otherwise it will just load back the same (problematic) addresses from the
cache again the second time. This introduces a new resolver bit
(REFRESH_CACHE) that also invalidates the existing cache entry while doing the
new resolve.

MozReview-Commit-ID: 5Bc2KiAGYYA

--HG--
extra : rebase_source : ae368c88a5db27f0980b9928439d27588bc84815
2018-03-06 14:50:21 +01:00
Nathan Froyd 19a0b532bc Bug 1443613 - don't allocate temporary strings for DNSRequestChild; r=mayhemer
DNSRequestChild's constructor takes `const nsCString&` parameters.  If
you have a `const nsACString&` argument to pass in to the constructor,
you're forced to construct a temporary nsCString object to satisfy the
prototype.  But the temporary string will just get copied inside the
constructor and you'll have to destroy the temporary string object you
created.

Let's skip all this, and just have DNSRequestChild take `const
nsACString&` arguments instead, and avoid the temporary object.
2018-03-07 12:22:03 -05:00
Daniel Stenberg 80c6547919 bug 1443489 - TRR: require a pref set to allow early AAAA responses r=valentin
Early AAAA responses might cause issues on hosts without working native
IPv6 connectivity, of course especially notable in TRR-only mode.

MozReview-Commit-ID: 6ZqE6AKnucH

--HG--
extra : rebase_source : ff42cb8daf941a3fa1f7e783c76d823e879024c3
2018-03-06 16:07:29 +01:00
Daniel Stenberg 76003c2ab0 bug 1440563 - set the RD bit in DOH requests r=valentin
RFC 1035 section 4.1.1 documents this bit as:

RD - Recursion Desired - this bit may be set in a query and is copied
into the response.  If RD is set, it directs the name server to pursue
the query recursively.  Recursive query support is optional.

MozReview-Commit-ID: 8iHDgNtA1L1

--HG--
extra : rebase_source : a29010a2894fd00ebfbfb869f5938cf507345a2f
2018-03-05 08:47:52 +01:00
Florian Quèze c714053d73 Bug 1433175 - scripted patch to replace Components.classes[, Components.interfaces.nsI, Components.utils. and Components.results. with Cc, Ci, Cu and Cr, r=Mossop. 2018-02-28 18:51:33 +01:00
Florian Quèze 682b1ec3b2 Bug 1440284 - change this.EXPORTED_SYMBOLS back to var EXPORTED_SYMBOLS in JS modules, r=mccr8. 2018-02-23 20:50:01 +01:00
Ciure Andrei 852a0c8890 Merge inbound to mozilla-central. a=merge 2018-02-22 23:55:25 +02:00
Daniel Stenberg 14fc881f71 bug 1438947 - mutex nsHostRecord::mTrrA[AAA] accesses r=valentin
... and remove Cancel() from nsHostRecord::RemoveOrRefresh since we
don't need to cancel TRR resolves due to network changes.

MozReview-Commit-ID: Akuhpzgg4N5
2018-02-22 04:22:00 +02:00
Daniel Stenberg 9165893084 bug 1440234 - show TRR column in about:networking for DNS names r=baku,valentin
MozReview-Commit-ID: LtAHJj4BMqQ

--HG--
extra : rebase_source : 089544e53e652aa8d43f0927e6d140568f68e93f
2018-02-22 09:57:22 +01:00
Valentin Gosu 55a7a824c6 Bug 1435671 - Reduce binary size by making NS_MutateURI.Apply not be a templated method r=mayhemer
We instead add a templated method NS_MutatorMethod that returns a std::function<nsresult(nsIURIMutator*)> which Apply then calls with mMutator as an argument.
The function returned by NS_MutatorMethod performs a QueryInterface, then calls the passed method with arguments on the result.

MozReview-Commit-ID: Jjqp7gGLG1D

--HG--
extra : rebase_source : f2a17aee7bb66a7ba8652817d43b9aa7ec7ef710
2018-02-21 01:00:54 +01:00
Valentin Gosu 98e8686b20 Bug 1439538 - Convert nsHostResolver::m{High,Medium,Low,Eviction}Q to LinkedList<RefPtr<nsHostRecord>> r=bagder
MozReview-Commit-ID: CDMadOtmDHQ

--HG--
extra : rebase_source : aa366237886c7d07cb3d83a15c50a54c08606848
2018-02-20 17:41:50 +01:00
nbeleuzu@mozilla.com 01eef6aff1 Backed out changeset c9dcce0a1068 (bug 1435671) for build bustages on nsIURIMutator.h. CLOSED TREE 2018-02-21 00:06:46 +02:00
Valentin Gosu f1850e9354 Bug 1435671 - Reduce binary size by making NS_MutateURI.Apply not be a templated method r=mayhemer
We instead add a templated method NS_MutatorMethod that returns a std::function<nsresult(nsIURIMutator*)> which Apply then calls with mMutator as an argument.
The function returned by NS_MutatorMethod performs a QueryInterface, then calls the passed method with arguments on the result.

MozReview-Commit-ID: Jjqp7gGLG1D

--HG--
extra : rebase_source : 592d13349a8c4627c7ce3146ec592f577b39f3cc
2018-02-20 22:39:40 +01:00
Daniel Stenberg 27d3309d96 bug 1439067 - let TRR access TRRService through the null-checked global. r=valentin
... and also store allow-rfc1918 bool locally to remove later accesses
to TRRservice.

MozReview-Commit-ID: KkO4u2N9gfE

--HG--
extra : rebase_source : 2fdfecb127987cdbfdccd0e77f7b4bb65f6f5f5d
2018-02-19 22:54:14 +01:00
Daniel Stenberg 30ccb2d14c bug 1439302 - repair the *RESOLVEAGAIN logic in nsHostResolver::CompleteLookup r=valentin
When the native resolve needs to run again, the rec->mResolving counter
must not be decreased, as otherwise it triggers an assert when the next
resolve completes.

MozReview-Commit-ID: 3UQGkDSOmGi

--HG--
extra : rebase_source : 1caf047070a95b451acf0ddca6b5986f4e4d7c69
2018-02-19 23:33:40 +01:00
Daniel Stenberg c8bcf8f7e5 bug 1439340 - lock addr_info in nsHostRecord::RemoveOrRefresh r=valentin
MozReview-Commit-ID: 6h4Sk1NjAJT

--HG--
extra : rebase_source : a8d54768f7493d8e2e1f435fe5a1e5c6e245ffb7
2018-02-19 09:03:09 +01:00
Daniel Stenberg 74167930bd bug 1438947 - avoid unnecessary timer cancels + clears r=valentin
To avoid race risk.

MozReview-Commit-ID: 2h8xkmgjPP7

--HG--
extra : rebase_source : 31e0fef119862343467049347b012cc6e3056f2c
2018-02-17 00:35:14 +01:00
Daniel Stenberg e5d3226694 bug 1434852 - introducing TRR (DOH); r=mcmanus,valentin
Provides an optional resolver mechanism for Firefox that allows running
together with or instead of the native resolver.

TRR offers resolving of host names using a dedicated DNS-over-HTTPS server
(HTTPS is required, HTTP/2 is preferable).

DNS-over-HTTPS (DOH) allows DNS resolves with enhanced privacy, secure
transfers and improved performance.

To keep the failure rate at a minimum, the TRR system manages a dynamic
persistent blacklist for host names that can't be resolved with DOH but works
with the native resolver. Blacklisted entries will not be retried over DOH for
a couple of days. "localhost" and names in the ".local" TLD will not be
resolved via DOH.

TRR is preffed OFF by default and you need to set a URI for an available DOH
server to be able to use it. Since the URI for DOH is set with a name itself,
it may have to use the native resolver for bootstrapping. (Optionally, the
user can set the IP address of the DOH server in a pref to avoid the required
initial native resolve.)

When TRR starts up, it will first verify that it works by checking a
"confirmation" domain name. This confirmation domain is a pref by default set
to "example.com". TRR will also by default await the captive-portal detection
to raise its green flag before getting activated.

All prefs for TRR are under the "network.trr" hierarchy.

The DNS-over-HTTPS spec: https://tools.ietf.org/html/draft-ietf-doh-dns-over-https-03

MozReview-Commit-ID: GuuU6vjTjlm

--HG--
extra : rebase_source : 53fcca757334090ac05fec540ef29d109d5ceed3
2018-02-01 10:20:49 +01:00
Andrew McCreight 5dec0e0beb Bug 1432992, part 1 - Remove definitions of Ci, Cr, Cc, and Cu. r=florian
This patch was autogenerated by my decomponents.py

It covers almost every file with the extension js, jsm, html, py,
xhtml, or xul.

It removes blank lines after removed lines, when the removed lines are
preceded by either blank lines or the start of a new block. The "start
of a new block" is defined fairly hackily: either the line starts with
//, ends with */, ends with {, <![CDATA[, """ or '''. The first two
cover comments, the third one covers JS, the fourth covers JS embedded
in XUL, and the final two cover JS embedded in Python. This also
applies if the removed line was the first line of the file.

It covers the pattern matching cases like "var {classes: Cc,
interfaces: Ci, utils: Cu, results: Cr} = Components;". It'll remove
the entire thing if they are all either Ci, Cr, Cc or Cu, or it will
remove the appropriate ones and leave the residue behind. If there's
only one behind, then it will turn it into a normal, non-pattern
matching variable definition. (For instance, "const { classes: Cc,
Constructor: CC, interfaces: Ci, utils: Cu } = Components" becomes
"const CC = Components.Constructor".)

MozReview-Commit-ID: DeSHcClQ7cG

--HG--
extra : rebase_source : d9c41878036c1ef7766ef5e91a7005025bc1d72b
2018-02-06 09:36:57 -08:00
Florian Quèze 2b1c8dccb6 Bug 1339461 - script-generated patch to convert foo.indexOf(...) == -1 to foo.includes(), r=Mossop. 2018-02-01 20:45:22 +01:00
Kris Maglione 918ed6c474 Bug 1431533: Part 5a - Auto-rewrite code to use ChromeUtils import methods. r=florian
This was done using the following script:
37e3803c7a/processors/chromeutils-import.jsm

MozReview-Commit-ID: 1Nc3XDu0wGl

--HG--
extra : source : 12fc4dee861c812fd2bd032c63ef17af61800c70
extra : intermediate-source : 34c999fa006bffe8705cf50c54708aa21a962e62
extra : histedit_source : b2be2c5e5d226e6c347312456a6ae339c1e634b0
2018-01-29 15:20:18 -08:00
Cosmin Sabou 9a65a40178 Backed out 3 changesets (bug 1431533) for Android mochitest failures on testEventDispatcher on a CLOSED TREE
Backed out changeset a1eca62826a1 (bug 1431533)
Backed out changeset 34c999fa006b (bug 1431533)
Backed out changeset e2674287e57f (bug 1431533)
2018-01-30 07:17:48 +02:00
Kris Maglione 6476f95b13 Bug 1431533: Part 5a - Auto-rewrite code to use ChromeUtils import methods. r=florian
This was done using the following script:
37e3803c7a/processors/chromeutils-import.jsm

MozReview-Commit-ID: 1Nc3XDu0wGl

--HG--
extra : source : 12fc4dee861c812fd2bd032c63ef17af61800c70
2018-01-29 15:20:18 -08:00
Brindusan Cristian af8879d1eb Backed out 2 changesets (bug 1431533) for ESlint failures on a CLOSED TREE
Backed out changeset 6e56f4c8843e (bug 1431533)
Backed out changeset 12fc4dee861c (bug 1431533)
2018-01-30 02:32:43 +02:00
Kris Maglione c276bb9375 Bug 1431533: Part 5a - Auto-rewrite code to use ChromeUtils import methods. r=florian
This was done using the following script:
37e3803c7a/processors/chromeutils-import.jsm

MozReview-Commit-ID: 1Nc3XDu0wGl

--HG--
extra : rebase_source : c004a023389f1f6bf3d2f3efe93c13d423b23ccd
2018-01-29 15:20:18 -08:00
Kris Maglione a75561bd62 Bug 1412726: Clean up XPCOM singleton constructor refcount handling. r=froydnj
This is a follow-up to bug 1409249. There are a lot of places where our
factory singleton constructors either don't correctly handle their returned
references being released by the component manager, or do handle it, but in
ways that are not obvious.

This patch handles a few places where we can sometimes wind up with dangling
singleton pointers, adds some explanatory comments and sanity check
assertions, and replaces some uses of manual refcounting with StaticRefPtr and
ClearOnShutdown.

There are still some places where we may wind up with odd behavior if the
first QI for a getService call fails. In those cases, we wind up destroying
the first instance of a service that we create, and re-creating a new one
later.

MozReview-Commit-ID: ANYndvd7aZx

--HG--
extra : rebase_source : acfb0611a028fef6b9387eb5d1d9e285782fbc7c
2017-10-29 16:02:40 -07:00
Valentin Gosu c4e59fe243 Bug 1427373 - Convert nsHostResolver.mDB from PLDHashTable to nsRefPtrHashtable r=mayhemer
* Converts PLDHashTable mDB to nsRefPtrHashtable<nsGenericHashKey<nsHostKey>, nsHostRecord> mRecordDB
* Removes nsHostDBEnt and associated PLDHashTableOps

This patch makes the code a lot easier to understand, by simplifying the
ownership model. Now the hashtable holds RefPtr<nsHostRecord>, so it's
easier to follow the lifetime of each record.

MozReview-Commit-ID: IMavN8YSPSn

--HG--
extra : rebase_source : 3ff3135e2d9610577f15aaf307a62eec5ed3b47a
2018-01-07 23:22:01 +01:00
Valentin Gosu c0d1211c67 Bug 1427373 - Use a refPtr for rec so that CompleteLookup doesn't need to release it r=mayhemer
MozReview-Commit-ID: 4LUxxJ13Bg3

--HG--
extra : rebase_source : d0e9316b9ee911f3d4a62a8de407176a50415cb2
2018-01-07 23:00:07 +01:00
Jeff Hemphill 73c0663aec Bug 1425807 - Convert nsHostKey members to nsCString r=valentin
MozReview-Commit-ID: 8tZUukA8Rrk

--HG--
extra : rebase_source : 4877c8eef1c2fd3a630316641d492189663acc61
2017-12-22 14:08:17 -08:00
Valentin Gosu 679361e438 Bug 1424834 - LinkedList::sizeOfExcludingThis should use ConstRawType instead of T* r=njn
MozReview-Commit-ID: 2EM9cEOAkIl

--HG--
extra : rebase_source : 05ebe36ecdaacbaf26bd1b6e23715035996f88b4
2017-12-20 01:13:53 +01:00
Valentin Gosu a7fe7a006d Bug 1424834 - Replace nsHostRecord.callbacks with LinkedList<RefPtr<nsResolveHostCallback>> r=mayhemer
* nsResolveHostCallback extends nsISupports (for addref-ing and because nsDNSAsyncRequest implements nsICancelable)
* nsResolveHostCallback extends LinkedListElement<RefPtr<nsResolveHostCallback>> so the list can properly manage references
* nsDNSAsyncRequest and nsDNSSyncRequest properly implement nsISupports and use RefPtr to manage lifetimes


MozReview-Commit-ID: 5NvBcWZzfyN

--HG--
extra : rebase_source : 67adcbd20a29803e5abbb3d16324f9cac6771d28
2017-12-20 01:13:46 +01:00
Dorel Luca d9227411a0 Backed out 2 changesets (bug 1424834) for AddressSanitizer failure r=backout a=backout
Backed out changeset 00e1d58aedfe (bug 1424834)
Backed out changeset 9b69f2b7d373 (bug 1424834)
2017-12-19 13:59:02 +02:00
Phil Ringnalda 74065c09ed Backed out changeset fc0b6106be47 (bug 1425807) for static build bustage
CLOSED TREE
2017-12-18 18:31:20 -08:00
Jeff Hemphill 6d1f1c52d8 Bug 1425807 - Convert nsHostKey members to nsCString. r=valentin
MozReview-Commit-ID: 8tZUukA8Rrk

--HG--
extra : source : 966836866e8afe423a01a9926834a26cb3d3e2b0
extra : amend_source : 8602ab726f16bc561fafc5196d05fa9578073471
extra : histedit_source : 724da61db9ba94554bfdb15992a3a2aad18eca14%2C2a576438e92928c4a8196429dbcd76d1bd1eca7d
2017-12-18 11:27:38 -08:00
Csoregi Natalia 10b1db0472 Backed out changeset 966836866e8a (bug 1425807) for Build Bustage. r=backout on a CLOSED TREE 2017-12-19 03:09:04 +02:00
Jeff Hemphill 0e5ba4ebd8 Bug 1425807 - Convert nsHostKey members to nsCString r=valentin
MozReview-Commit-ID: 8tZUukA8Rrk

--HG--
extra : rebase_source : 717e730de9c79f13553fa617c7588805683f18c5
2017-12-18 11:27:38 -08:00
Valentin Gosu 9d89df19e4 Bug 1424834 - LinkedList::sizeOfExcludingThis should use ConstRawType instead of T* r=njn
MozReview-Commit-ID: 2EM9cEOAkIl

--HG--
extra : rebase_source : b3950ed06e1bc014fff9aa1deb5c2387fb2eb5bb
2017-12-15 15:46:31 -06:00
Valentin Gosu d4f5405148 Bug 1424834 - Replace nsHostRecord.callbacks with LinkedList<RefPtr<nsResolveHostCallback>> r=mayhemer
* nsResolveHostCallback extends nsISupports (for addref-ing and because nsDNSAsyncRequest implements nsICancelable)
* nsResolveHostCallback extends LinkedListElement<RefPtr<nsResolveHostCallback>> so the list can properly manage references
* nsDNSAsyncRequest and nsDNSSyncRequest properly implement nsISupports and use RefPtr to manage lifetimes


MozReview-Commit-ID: 5NvBcWZzfyN

--HG--
extra : rebase_source : d8c5c89c35e455c5d8e6556a140a0ef119b95e86
2017-12-15 15:46:24 -06:00
Cosmin Sabou f0ab0b072a Backed out 2 changesets (bug 1424834) for leaks at netwerk/dns/nsHostResolver.cpp:352 r=backout a=backout
Backed out changeset 2503df83bbd9 (bug 1424834)
Backed out changeset 49cc08386f17 (bug 1424834)
2017-12-18 11:52:06 +02:00
Valentin Gosu a659128162 Bug 1424834 - LinkedList::sizeOfExcludingThis should use ConstRawType instead of T* r=njn
MozReview-Commit-ID: 2EM9cEOAkIl

--HG--
extra : rebase_source : b3950ed06e1bc014fff9aa1deb5c2387fb2eb5bb
2017-12-15 15:46:31 -06:00
Valentin Gosu d2697a43d6 Bug 1424834 - Replace nsHostRecord.callbacks with LinkedList<RefPtr<nsResolveHostCallback>> r=mayhemer
* nsResolveHostCallback extends nsISupports (for addref-ing and because nsDNSAsyncRequest implements nsICancelable)
* nsResolveHostCallback extends LinkedListElement<RefPtr<nsResolveHostCallback>> so the list can properly manage references
* nsDNSAsyncRequest and nsDNSSyncRequest properly implement nsISupports and use RefPtr to manage lifetimes


MozReview-Commit-ID: 5NvBcWZzfyN

--HG--
extra : rebase_source : d8c5c89c35e455c5d8e6556a140a0ef119b95e86
2017-12-15 15:46:24 -06:00