gecko-dev/netwerk/dns
Kris Maglione 257d9118dc Bug 1409249: Require singleton constructors to return explicit already_AddRefed. r=froydnj
Right now, NS_GENERIC_FACTORY_SINGLETON_CONSTRUCTOR expects singleton
constructors to return already-addrefed raw pointers, and while it accepts
constructors that return already_AddRefed, most existing don't do so.

Meanwhile, the convention elsewhere is that a raw pointer return value is
owned by the callee, and that the caller needs to addref it if it wants to
keep its own reference to it.

The difference in convention makes it easy to leak (I've definitely caused
more than one shutdown leak this way), so it would be better if we required
the singleton getters to return an explicit already_AddRefed, which would
behave the same for all callers.


This also cleans up several singleton constructors that left a dangling
pointer to their singletons when their initialization methods failed, when
they released their references without clearing their global raw pointers.

MozReview-Commit-ID: 9peyG4pRYcr

--HG--
extra : rebase_source : 2f5bd89c17cb554541be38444672a827c1392f3f
2017-10-16 21:08:42 -07:00
..
mdns Bug 1372405 - Provide names for all runnables in the tree (r=froydnj) 2017-06-26 14:19:58 -07:00
ChildDNSService.cpp Bug 1409249: Require singleton constructors to return explicit already_AddRefed. r=froydnj 2017-10-16 21:08:42 -07:00
ChildDNSService.h Bug 1409249: Require singleton constructors to return explicit already_AddRefed. r=froydnj 2017-10-16 21:08:42 -07:00
DNS.cpp Bug 1338086 - Remove useless else blocks in order to reduce complexity in netwerk/ r=dragana 2017-02-09 11:21:38 +01:00
DNS.h Bug 1288308 - Part 0: add Named Pipe type on Windows platform; r=bagder 2016-11-03 18:15:07 +08:00
DNSListenerProxy.cpp
DNSListenerProxy.h Bug 1372453 - Part 2: Name the caller of ProxyReleaseEvent. r=billm 2017-06-14 09:27:17 +08:00
DNSRequestChild.cpp Bug 1378930 - Part 2: Remove the aName parameter from SchedulerGroup/DocGroup/DispatcherTrait. r=billm 2017-07-26 16:13:35 +08:00
DNSRequestChild.h Bug 1337893 - Part 2: Making the DNS cache be aware of originAttributes. r=valentin 2017-02-14 12:25:35 +08:00
DNSRequestParent.cpp Bug 1365101 - Convert NS_GetCurrentThread uses in netwerk/ (r=meyhemer) 2017-06-12 20:21:43 -07:00
DNSRequestParent.h Bug 1337893 - Part 2: Making the DNS cache be aware of originAttributes. r=valentin 2017-02-14 12:25:35 +08:00
effective_tld_names.dat
GetAddrInfo.cpp Bug 1404147 Cast constants to the type they are compared to r=smaug 2017-09-28 17:47:43 -05:00
GetAddrInfo.h
moz.build Bug 1402048 - Remove the legacy non-IDNA2008 code path from nsIDNService, now that we always require ICU to build. r=valentin 2017-09-22 19:25:50 +01:00
nsDNSService2.cpp Bug 1409249: Require singleton constructors to return explicit already_AddRefed. r=froydnj 2017-10-16 21:08:42 -07:00
nsDNSService2.h Bug 1409249: Require singleton constructors to return explicit already_AddRefed. r=froydnj 2017-10-16 21:08:42 -07:00
nsEffectiveTLDService.cpp Bug 1396958 - Make eTLD cache thread-safe. r=valentin 2017-09-05 12:26:51 -07:00
nsEffectiveTLDService.h Bug 1380154 - Part 3: Cache most recently used eTLD entries. r=njn, r=jduell 2017-08-08 12:21:10 -07:00
nsHostResolver.cpp Bug 1403868 (part 4) - Reduce tools/profiler/public/*.h to almost nothing in non-MOZ_GECKO_PROFILER builds. r=mstange. 2017-10-04 09:11:18 +11:00
nsHostResolver.h Bug 1378712 - Remove all trailing whitespaces r=Ehsan 2017-07-06 14:00:35 +02:00
nsIDNKitInterface.h Bug 1378712 - Remove all trailing whitespaces r=Ehsan 2017-07-06 14:00:35 +02:00
nsIDNService.cpp Backed out changeset 3d0093f961ee (bug 1410794) for Mac plugin crashes and Android test_worker_interfaces.html failures 2017-10-24 22:46:36 -07:00
nsIDNService.h Bug 1402048 - Remove the legacy non-IDNA2008 code path from nsIDNService, now that we always require ICU to build. r=valentin 2017-09-22 19:25:50 +01:00
nsIDNSListener.idl
nsIDNSRecord.idl
nsIDNSService.idl Bug 1398646: Forbid sync DNS resolution on the main thread. r=valentin 2017-09-10 19:13:42 -07:00
nsIEffectiveTLDService.idl
nsIIDNService.idl
nsPIDNSService.idl
PDNSParams.h
PDNSRequest.ipdl Bug 1337893 - Part 1: Updating idl and ipdl files of DNS to make them originAttributes aware. r=valentin 2017-02-15 11:53:37 +08:00
PDNSRequestParams.ipdlh
prepare_tlds.py Bug 1380154 - Part 2: Generate a DAFSA and use it for eTLDs. r=jduell 2017-07-17 16:10:18 -07:00
punycode.c
punycode.h