gecko-dev/modules/libjar
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
..
test Bug 1421992 - script-generated patch to replace do_check_* functions with their Assert.* equivalents, rs=Gijs. 2017-12-21 11:08:17 +01:00
zipwriter Bug 1421992 - script-generated patch to replace do_execute_soon, do_print and do_register_cleanup with executeSoon, info and registerCleanupFunction, rs=Gijs. 2017-12-21 11:10:23 +01:00
appnote.txt
moz.build bug 1382749 - remove the "old way" of signing add-ons r=aklotz,mossop 2017-07-19 13:09:46 -07:00
nsIJARChannel.idl Bug 1376496 - Part 2 - Don't request FD from parent when JAR file is cached. r=mayhemer 2017-07-21 15:19:09 -07:00
nsIJARFactory.h
nsIJARProtocolHandler.idl
nsIJARURI.idl Bug 1416343 - Mark URI interfaces as [builtinclass] r=bagder 2017-11-15 13:34:23 +01:00
nsIZipReader.idl bug 1382749 - remove the "old way" of signing add-ons r=aklotz,mossop 2017-07-19 13:09:46 -07:00
nsJAR.cpp Bug 1399520 - Avoid race condition. r=dragana 2017-10-19 22:29:41 -04:00
nsJAR.h Bug 1399520 - Avoid race condition. r=dragana 2017-10-19 22:29:41 -04:00
nsJARChannel.cpp Bug 1412726: Clean up XPCOM singleton constructor refcount handling. r=froydnj 2017-10-29 16:02:40 -07:00
nsJARChannel.h Bug 1412726: Clean up XPCOM singleton constructor refcount handling. r=froydnj 2017-10-29 16:02:40 -07:00
nsJARFactory.cpp Bug 1412726: Clean up XPCOM singleton constructor refcount handling. r=froydnj 2017-10-29 16:02:40 -07:00
nsJARInputStream.cpp Bug 1340910 - pt 2+3 - Import Brotli 0.6.0 from upstream, and Gecko updates required to work with Brotli 0.6.0 API changes. r=glandium 2017-08-09 11:45:39 +01:00
nsJARInputStream.h Bug 1340910 - pt 2+3 - Import Brotli 0.6.0 from upstream, and Gecko updates required to work with Brotli 0.6.0 API changes. r=glandium 2017-08-09 11:45:39 +01:00
nsJARProtocolHandler.cpp Bug 1412726: Clean up XPCOM singleton constructor refcount handling. r=froydnj 2017-10-29 16:02:40 -07:00
nsJARProtocolHandler.h Bug 1412726: Clean up XPCOM singleton constructor refcount handling. r=froydnj 2017-10-29 16:02:40 -07:00
nsJARURI.cpp Bug 1415574 - make nsJARURI::SetSpecWithBase ignore URL string; r=bagder 2017-11-21 14:26:43 +08:00
nsJARURI.h Bug 1420954 - Make nsIURIMutator setters return nsIURIMutator so we can chain setters r=bagder 2017-12-05 02:35:21 +01:00
nsZipArchive.cpp Bug 1417093 - remove symlink support from our nsZipArchive extract implementation because it's unused and has issues, r=mossop 2017-11-21 16:25:46 +00:00
nsZipArchive.h Bug 1417093 - remove symlink support from our nsZipArchive extract implementation because it's unused and has issues, r=mossop 2017-11-21 16:25:46 +00:00
zipstruct.h Bug 1378712 - Remove all trailing whitespaces r=Ehsan 2017-07-06 14:00:35 +02:00