Commit Graph

149 Commits

Author SHA1 Message Date
Eric Rahm
bd957615ed Bug 1162336 - Part 1: Remove instances of #ifdef PR_LOGGING in netwerk. r=froydnj
PR_LOGGING is now always defined, we can remove #ifdefs checking for it.
2015-05-07 10:35:28 -07:00
Dragana Damjanovic
eb0b6322ab Bug 1108957 - Add per network interface dns query. This is possible only with gonk. r=mayhemer 2015-02-19 00:14:00 -05:00
Nicholas Nethercote
3b0764a330 Bug 1131901 (part 1) - Make PL_DHashTableAdd() infallible by default, and add a fallible alternative. r=froydnj.
I kept all the existing PL_DHashTableAdd() calls fallible, in order to be
conservative, except for the ones in nsAtomTable.cpp which already were
followed immediately by an abort on failure.
2015-02-02 14:48:58 -08:00
Dragana Damjanovic
d9bbad329b Bug 1123324 - Additional fix for nsHostResolver. r=sworkman 2015-02-10 08:45:00 -05:00
Andrew McCreight
414d2fb22b Bug 1131199, part 2 - Make PLDHashtInitEntry infallible. r=froydnj
Also, drop the unused table argument.
2015-02-11 09:46:40 -08:00
Nicholas Nethercote
1ce96de5ae Back out changesets 2fcef6b54be7, 2be07829fefc, 66dfe37b8532, df3fcd2be8fd, 0a436bce77a6 (bug 1050035) for causing intermittent crashes and assertion failures. 2015-02-10 14:39:49 -08:00
Nicholas Nethercote
a3bf151ee6 Bug 1050035 (part 4) - Make PL_DHashTableAdd() infallible by default, and add a fallible alternative. r=froydnj.
I kept all the existing PL_DHashTableAdd() calls fallible, in order to be
conservative, except for the ones in nsAtomTable.cpp which already were
followed immediately by an abort on failure.
2015-02-02 14:48:58 -08:00
Dragana Damjanovic
77bee3e387 Bug 1123324 - Fix host resolve. r=sworkman 2015-02-03 00:16:00 -05:00
Nicholas Nethercote
52a33c5a1b Bug 1124973 (part 3) - Use PL_DHashTableSearch() in nsHostResolver.cpp. r=froydnj,sworkman.
Currently nsHostResolver.cpp uses PL_DHashTableLookup() and fails to use
PL_DHASH_ENTRY_IS_{FREE,BUSY} on the result the way it should. However, I think
it gets away with this because it always does this on the result:

  if (!he || !he->rec) { /* do stuff with |he->rec| */ }

The |!he| test is useless and always fails, but the |!he->rec| does the right
thing because (a) entry storage is always zeroed when the table is created, (b)
HostDB_ClearEntry() zeroes the |rec| field (via NS_RELEASE). So unused entries
always have a null |rec| field.

Furthermore, |he->rec| is never zero in a used entry because HostDB_InitEntry
always assigns it with a nsHostRecord assigned with infallible new in
nsHostRecord::Create (and there are existing assertions to this effect).

All this means that when this patch switches PL_DHashTableLookup to
PL_DHashTableSearch it can drop the |!he->rec| test and just do this:

  if (!he) { /* do stuff with |he->rec| */ }

Finally, there's a comment about HostDB_InitEntry failing which is bogus
because HostDB_InitEntry cannot fail. This patch fixes that too.
2015-01-22 21:25:44 -08:00
Nicholas Nethercote
c38455902a Bug 1124973 (part 2) - Introduce PL_DHashTableSearch(), and replace most PL_DHashTableLookup() calls with it. r=froydnj.
It feels safer to use a function with a new name, rather than just changing the
behaviour of the existing function.

For most of these cases the PL_DHashTableLookup() result was checked with
PL_DHASH_ENTRY_IS_{FREE,BUSY} so the conversion was easy. A few of them
preceded that check with a useless null check, but the intent of these was
still easy to determine.

I'll do the trickier ones in subsequent patches.
2015-01-22 21:06:55 -08:00
Dragana Damjanovic
1815488964 Bug 1108971 - Fix parameter in call GetAddrInfo. r=sworkman 2015-01-15 01:21:00 +01:00
Nicholas Nethercote
d746138aca Bug 1121304 (part 2, attempt 2) - Remove PLDHashTableOps::{alloc,free}Table. r=froydnj. 2015-01-14 14:35:56 -08:00
Phil Ringnalda
41e41579d9 Backed out 2 changesets (bug 1121304) for consistent b2g hangs in webgl-color-test.html?frame=1&__&preserve&premult&_____
Backed out changeset 20651ac19549 (bug 1121304)
Backed out changeset 758afec77c95 (bug 1121304)
2015-01-14 22:02:23 -08:00
Nicholas Nethercote
70f5bf6167 Bug 1121304 (part 2) - Remove PLDHashTableOps::{alloc,free}Table. r=froydnj. 2015-01-14 14:35:56 -08:00
Nicholas Nethercote
43fc26b699 Bug 1120476 (part 4) - Remove PLDHashTableOps::finalize. r=froydnj. 2015-01-13 19:02:35 -08:00
Nicholas Nethercote
eda870fe92 Bug 1120476 (part 3) - Remove PLDHashTable::data. r=froydnj. 2015-01-13 16:42:13 -08:00
Michael Pruett
cbe37abc44 Bug 1118024 - Use new PL_DHashTable{Add,Lookup,Remove} functions. r=nfroyd 2015-01-05 20:27:28 -06:00
Steve Workman
1a77128282 Bug 1084645 - Enable DNS TTL by default on Windows r=mcmanus 2014-10-20 10:26:33 -07:00
Steve Workman
23e9378d5b Bug 1074789 - Adjust DNS renewal time telemetry to take TTL experiments into consideration r=mcmanus 2014-10-07 14:57:48 -07:00
Daniel Stenberg
5a3a1309e2 Bug 1077084 - improved DNS cache pruning. r=sworkman 2014-10-13 23:07:00 +02:00
Ehsan Akhgari
71c001ec24 Bug 1080937 - Fix a clang-cl build error in nsHostResolver.cpp; r=sworkman 2014-10-11 09:41:51 -04:00
Eric Rahm
b8709b7dc6 Bug 806819 - Part 3: Remove redundant FORCE_PR_LOG entries. r=ehsan 2014-10-08 13:17:32 -07:00
Wes Kocher
e9f3c5a025 Backed out 5 changesets (bug 806819) for WinXP test failures on a CLOSED TREE
Backed out changeset 009ae35b0c67 (bug 806819)
Backed out changeset 5a57f87f5061 (bug 806819)
Backed out changeset f06cd735b5b3 (bug 806819)
Backed out changeset e25a2a8d4af4 (bug 806819)
Backed out changeset 70a167982c3f (bug 806819)
2014-10-06 16:32:50 -07:00
Eric Rahm
e037820a94 Bug 806819 - Part 3: Remove redundant FORCE_PR_LOG entries. r=ehsan 2014-10-06 13:08:20 -07:00
Daniel Stenberg
af7be33d91 Bug 939318 - Detect network interface changes on Windows. r=mcmanus
Now supports IPv6 as well if a new enough windows version is used.
Which notification function to use is detect at run-time.

Now sends CHANGED event if the online interface(s) are different in any
way since it was previously checked and considered UP. CHANGED is sent
before UP in case both are detected. It does not send any CHANGED events
during the first 2 seconds after startup.

nIOService: split up the network event receiver function from the
network status init function and have the event receiver act on the
incoming event.

DNSservice: acts on network changes (flushes the host cache and restarts
ongoing name resolves)

HttpHandler: acts on network changes
2014-09-24 23:14:00 -04:00
Steve Workman
a3f46a74b1 Bug 1070966 - Change WrapRunnableNM to NS_NewRunnableMethodWithArg r=mcmanus 2014-09-24 09:56:13 -07:00
Ed Morley
5eda4c7b7e Backed out changeset 89d06d103c10 (bug 939318) for Valgrind failures; CLOSED TREE 2014-09-24 16:17:57 +01:00
Daniel Stenberg
5844edb1f6 Bug 939318 - Detect network interface changes on windows. r=mcmanus
Now supports IPv6 as well if a new enough windows version is used.
Which notification function to use is detect at run-time.

Now sends CHANGED event if the online interface(s) are different in any
way since it was previously checked and considered UP. CHANGED is sent
before UP in case both are detected. It does not send any CHANGED events
during the first 2 seconds after startup.

nIOService: split up the network event receiver function from the
network status init function and have the event receiver act on the
incoming event.

DNSservice: acts on network changes (flushes the host cache and restarts
ongoing name resolves)

HttpHandler: acts on network changes
2014-09-23 03:48:00 -04:00
John Sullivan
dfa453019a Bug 1067679 - Call DnsQuery in addition to getaddrinfo to get DNS TTL on Windows r=sworkman 2014-09-20 15:10:18 -07:00
Patrick McManus
ba204f33bc Bug 820391 - Backout revision 4741ef815af9 for various regressions.
DONTBUILD
2014-08-21 10:53:11 -04:00
Ryan VanderMeulen
f3f389cff3 Backed out changeset 49502f43bd03 for landing with the wrong bug number. 2014-08-21 11:03:02 -04:00
Patrick McManus
576f63ec54 bug 820931 - backout 4741ef815af9 r=backout 2014-08-21 10:53:11 -04:00
josullivan
bf594e4466 Bug 820391: Use DnsQuery on Windows. r=sworkman
From 21e22e494541d5e4c085a6ba84e1bc5b4c92330e Mon Sep 17 00:00:00 2001
---
 netwerk/dns/DNS.cpp            |  65 +++++++-
 netwerk/dns/DNS.h              |   6 +
 netwerk/dns/GetAddrInfo.cpp    | 362 +++++++++++++++++++++++++++++++++++++++++
 netwerk/dns/GetAddrInfo.h      |  65 ++++++++
 netwerk/dns/moz.build          |   1 +
 netwerk/dns/nsHostResolver.cpp | 320 ++++++++++++++++++++++++++----------
 netwerk/dns/nsHostResolver.h   |  43 ++++-
 7 files changed, 766 insertions(+), 96 deletions(-)
 create mode 100644 netwerk/dns/GetAddrInfo.cpp
 create mode 100644 netwerk/dns/GetAddrInfo.h
2014-08-15 17:25:06 -07:00
Patrick McManus
fd7a91c539 bug 982565 - make dns ttl and grace period prefs respect 1s granularity r=sworkman 2014-03-09 06:01:56 -04:00
Nicholas Nethercote
c145d0baeb Bug 969902 - Fix a problem with DNS memory reporting measurement. r=sworkman. 2014-03-10 15:44:35 -07:00
Patrick McManus
f2c475ba89 bug 981513 - revert 807441 r=sworkman 2014-03-09 11:00:18 -04:00
Nicholas Hurley
bf4c713d96 Bug 957759 - Remove SRV experiment code (helps prevent crashes). r=mcmanus 2014-01-09 13:50:04 -08:00
Birunthan Mohanathas
49ae16d483 Bug 784739 - Switch from NULL to nullptr in remaining directories; r=ehsan 2014-01-06 10:06:04 -05:00
Nicholas Hurley
25c28db55a Bug 950888 - Check for null DNS results before using them. r=mcmanus 2013-12-19 12:54:47 -08:00
Jason Duell
aff7a80ada Bug 945066: remote nsIDNSService to child. r=jdm
* * *
bug 945066. Fix windows bustage.  r=jduell
2013-12-11 11:03:51 -08:00
Jason Duell
403f05b79d Bug 942317. Bustage fix for windows r=bustage 2013-12-11 02:05:40 -08:00
Nicholas Hurley
3faf8ff253 Bug 942317 - An experiment to test how reachable SRV records are in the wild. r=mcmanus 2013-12-05 15:23:22 -08:00
Steve Workman
9ed7fd05ad Bug 938803 - Correct typo in nsHostResolver::ResolveHost for Bug 941884: 'he' to 'unspecHe' r=mcmanus 2013-11-25 14:58:29 -08:00
Nicholas Nethercote
c6869641e6 Bug 893857 (part 2) - Add a memory reporter for the DNS service. r=sworkman. 2013-11-24 15:24:12 -08:00
Ehsan Akhgari
8b3a2feabb Bug 942489 - Deunify more files that are caught by bug 941854; r=BenWa 2013-11-24 01:29:24 -05:00
Steve Workman
557b4f20a4 Bug 941884 - Add some null checks for nsHostRecords r=mcmanus 2013-11-22 11:15:52 -08:00
Steve Workman
a325925b3b Bug 941884 - Add negative DNS cache entries to the eviction queue r=mcmanus 2013-11-22 11:15:51 -08:00
Ehsan Akhgari
8fd6a10a61 Follow-up to bug 941406 - Mark a variable as DebugOnly in order to shut up the compiler warning
Landed on a CLOSED TREE
2013-11-22 10:56:47 -05:00
Nathan Froyd
e6a22dd4f6 Bug 941598 - constify PLDHashTableOps in netwerk/; r=jduell 2013-11-20 13:17:01 -05:00
Steve Workman
efbe9ecd26 Bug 938803 - Improve DNS debugs to show which path is taken in nsHostResolver::ResolveHost r=mcmanus 2013-11-21 13:35:44 -08:00