gecko-dev/extensions/cookie
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
..
test Bug 870460 - Part 2: Close syncconn for edge cases. r=nwgh 2017-10-09 00:19:00 -04:00
moz.build Bug 1362791 - Enable testing permissions using URIs without having to mint principals; r=mystor 2017-05-20 00:59:09 -04:00
nsCookieModule.cpp Bug 1390428 (part 9) - Remove nsXPIDLCString. r=erahm. 2017-08-17 15:29:03 +10:00
nsCookiePermission.cpp Bug 1399590 - Modify the argument of nsICookiePermission::CanAccess for changing nsIURI to nsIPrincipal. r=jdm 2017-10-03 14:37:11 +08:00
nsCookiePermission.h
nsPermission.cpp Bug 1328653 - Merging all the various *OriginAttributes to just one, r=huseby 2017-01-12 17:38:48 +01:00
nsPermission.h Bug 1302047 - Ignore userContextId and firstPartyDomain when matching permissions. r=baku 2016-09-20 16:35:21 +08:00
nsPermissionManager.cpp Bug 1409249: Require singleton constructors to return explicit already_AddRefed. r=froydnj 2017-10-16 21:08:42 -07:00
nsPermissionManager.h Bug 1409249: Require singleton constructors to return explicit already_AddRefed. r=froydnj 2017-10-16 21:08:42 -07:00
nsPopupWindowManager.cpp Bug 1378712 - Remove all trailing whitespaces r=Ehsan 2017-07-06 14:00:35 +02:00
nsPopupWindowManager.h