gecko-dev/netwerk
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
..
base Bug 1412726: Clean up XPCOM singleton constructor refcount handling. r=froydnj 2017-10-29 16:02:40 -07:00
build Bug 1415205 - Add nsIURIMutator impls for all objects implementing nsIURI r=bagder 2017-11-20 17:11:30 +01:00
cache Bug 1427023 - Remove nsCRT::strncmp. r=erahm 2018-01-09 23:49:37 +09:00
cache2 Bug 1394734 - Replace CONFIG['GNU_C*'] by CONFIG['CC_TYPE'] r=glandium 2017-12-07 22:09:15 +01:00
cookie Bug 1428589: Correctly handle expiring all the cookies in an entry. r=jdm 2018-01-11 06:07:38 +01:00
dns Bug 1412726: Clean up XPCOM singleton constructor refcount handling. r=froydnj 2017-10-29 16:02:40 -07:00
ipc Bug 1424917 - Remove support for HSTS Priming. r=mayhemer, r=ckerschb 2018-01-10 11:07:00 -05:00
locales
mime Bug 1394734 - Replace CONFIG['GNU_C*'] by CONFIG['CC_TYPE'] r=glandium 2017-12-07 22:09:15 +01:00
protocol Bug 1401459 - always run HttpChannelChild::Release on main thread. r=mayhemer 2018-01-11 10:40:29 +08:00
sctp Bug 1425697: WEBRTC_DATACHANNEL_MAX_MESSAGE_SIZE_REMOTE_DEFAULT++. r=lennart.grahl+594092 2017-12-18 23:07:46 -08:00
socket Bug 1411001 - Remove the +x permissions on cpp & h files r=froydnj 2017-10-23 20:59:55 +02:00
srtp Bug 1394734 - Replace CONFIG['GNU_C*'] by CONFIG['CC_TYPE'] r=glandium 2017-12-07 22:09:15 +01:00
streamconv Bug 1427023 - Remove nsCRT::strncmp. r=erahm 2018-01-09 23:49:37 +09:00
system Bug 1394734 - Replace CONFIG['CLANG*'] by CONFIG['CC_TYPE'] r=glandium 2017-12-07 22:09:38 +01:00
test Bug 1426501 - Change JS code to use nsIURIMutator instead of the nsIURI.spec setter r=mayhemer 2018-01-08 15:20:29 +01:00
wifi Bug 1413044 - Move DBusHelper.h in uriloader/exthandler, r=smaug 2017-11-01 23:24:38 +01:00
moz.build
necko-config.h.in Bug 1391467 - Remove --enable-necko-protocols. r=gps,valentin 2017-08-17 17:30:57 -07:00