gecko-dev/dom
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
..
abort Bug 1408777 - Automatically fix instances of missing semicolons in the tree. r=Standard8 2017-10-15 20:50:39 +01:00
animation Bug 1407898 - Check if presContext is null before dereferencing in GetComputedKeyframeValues; r=hiro 2017-10-25 15:34:50 +09:00
asmjscache Bug 1408333 Get rid of nsIIPCBackgroundChildCreateCallback - part 6 - AsmJS, r=asuth 2017-10-24 12:02:40 +02:00
audiochannel
base Bug 1409249: Require singleton constructors to return explicit already_AddRefed. r=froydnj 2017-10-16 21:08:42 -07:00
battery
bindings Bug 638054 - Remove or fix tests outside JS using watch/unwatch. r=bz,fitzgen 2017-10-24 20:48:14 +02:00
broadcastchannel Bug 1411257 - No MOZ_CRASH if BackgroundChild::GetOrCreateForCurrentThread() fails - part 1 - BroadcastChannel, r=asuth 2017-10-25 08:45:52 +02:00
browser-element Bug 1406224 - Remove nsIDOMHTMLImageElement; r=bz 2017-10-06 13:27:23 -07:00
cache Bug 1408333 Get rid of nsIIPCBackgroundChildCreateCallback - part 12 - Cache API, r=asuth 2017-10-24 12:02:40 +02:00
canvas Bug 1410306 - Disable dom/canvas/test/webgl-conf/generated/test_2_conformance__glsl__misc__shader-uniform-packing-restrictions.html on win7/debug for frequent failures. r=me, a=testonly 2017-10-24 12:37:25 -04:00
commandhandler
console Bug 1403866 - No AutoSafeJSContext in Console.cpp, r=bz 2017-09-29 09:20:58 +02:00
credentialmanagement Bug 1407829 - WebAuthn: Implement CredMan's Store method r=qdot,ttaubert 2017-10-12 17:02:22 -07:00
crypto Bug 1401803 - WebAuthn types need to return ArrayBuffers r=keeler 2017-09-20 07:32:07 -07:00
encoding Bug 1406819 - Remove various bits of dead code from dom/. r=baku 2017-10-11 10:09:13 +01:00
events Backed out changeset dab1c5badddb (bug 1407679) for failing server startup in mochitests on Android. r=backout on a CLOSED TREE 2017-10-24 21:18:26 +02:00
fetch Bug 1380255 P2 Don't fire FetchDriverObserver::OnDataAvailable() for every FetchDriver ODA callback. r=baku 2017-10-12 19:23:16 -07:00
file Bug 1411257 - No MOZ_CRASH if BackgroundChild::GetOrCreateForCurrentThread() fails - part 3 - MutableBlobStorage, r=asuth 2017-10-25 08:45:52 +02:00
filehandle Bug 1404845 - Renaming BlobImpl::GetInternalStream to BlobImpl::CreateInputStream, r=smaug 2017-10-02 13:53:12 +02:00
filesystem Bug 1411257 - No MOZ_CRASH if BackgroundChild::GetOrCreateForCurrentThread() fails - part 4 - FileSystem APIs, r=asuth 2017-10-25 08:45:52 +02:00
flyweb Bug 1404198: Part 2i - Switch to NS_NewTimer* in dom. r=njn 2017-10-15 23:15:40 -07:00
gamepad Bug 1411257 - No MOZ_CRASH if BackgroundChild::GetOrCreateForCurrentThread() fails - part 6 - GamePad API, r=asuth 2017-10-25 08:45:53 +02:00
geolocation Bug 1404198: Part 2i - Switch to NS_NewTimer* in dom. r=njn 2017-10-15 23:15:40 -07:00
grid
html Bug 638054 - Remove or fix tests outside JS using watch/unwatch. r=bz,fitzgen 2017-10-24 20:48:14 +02:00
imptests
indexedDB Bug 1410142 - use NS_NewLocalFile in dom/; r=baku 2017-10-23 14:22:14 -04:00
interfaces Bug 1340415 - Ensure main-thread and async autoscrolling do not happen at the same time. r=kats 2017-10-18 18:18:13 -04:00
ipc Bug 1411257 - No MOZ_CRASH if BackgroundChild::GetOrCreateForCurrentThread() fails - part 9 - ContentChild, r=asuth 2017-10-25 08:45:53 +02:00
json
jsurl
locales Backed out changeset c5f2f0e827d0 (bug 1403027) for build bustage at dom/workers/WorkerPrivate.cpp(984): expression did not evaluate to a constant, at least on Windows. r=backout on a CLOSED TREE 2017-10-21 00:31:07 +02:00
manifest Bug 1409191 - Prefetch manifest before install. r=snorp 2017-10-19 00:59:58 +08:00
mathml Bug 1406278: Part 1 - Pass subject principal to SetAttribute and friends. r=bz 2017-10-09 14:33:38 -07:00
media merge mozilla-inbound to mozilla-central. r=merge a=merge 2017-10-24 11:52:35 +02:00
messagechannel Bug 1411257 - No MOZ_CRASH if BackgroundChild::GetOrCreateForCurrentThread() fails - part 2 - MessagePort, r=asuth 2017-10-25 08:45:52 +02:00
network Bug 1408333 Get rid of nsIIPCBackgroundChildCreateCallback - part 3 - UDPSocket, r=asuth 2017-10-24 12:02:39 +02:00
notification Bug 870698 - Part 4: Replace Equals("") with EqualsLiteral(""). r=erahm 2017-09-06 01:13:45 -07:00
offline Bug 1401848. Remove NS_IMPL_EVENT_HANDLER and its consumers. r=smaug 2017-09-22 18:07:05 -04:00
payments Bug 1313150 - Remove |weak| parameter from nsIMutableArray methods. r=froydnj 2017-10-21 23:53:02 +09:00
performance Backed out changeset c5f2f0e827d0 (bug 1403027) for build bustage at dom/workers/WorkerPrivate.cpp(984): expression did not evaluate to a constant, at least on Windows. r=backout on a CLOSED TREE 2017-10-21 00:31:07 +02:00
permission
plugins Bug 1411142 Cast enums to int to silence warning about comparing enums of different types r=jld 2017-10-23 23:54:21 -05:00
power
presentation Bug 1313150 - Remove |weak| parameter from nsIMutableArray methods. r=froydnj 2017-10-21 23:53:02 +09:00
promise Bug 1347644 - Baldr: implement ConsumeStreamCallback in browser (r=bkelly) 2017-10-10 14:41:24 -05:00
push Bug 1407838 - Remove the remains of NS_Alloc/NS_Realloc/NS_Free. r=njn 2017-10-12 11:08:44 +09:00
quota Bug 1409249: Require singleton constructors to return explicit already_AddRefed. r=froydnj 2017-10-16 21:08:42 -07:00
res
script Bug 1407056: Part 1 - Provide more consistent principal/origin URL to content policies. r=bz,ckerschb 2017-10-12 15:43:55 -07:00
secureelement
security Bug 1399956 - Disable some mochitests in headless. r=jrmuizel 2017-10-16 16:15:45 -07:00
smil Bug 849593 - Skip samples of active SMIL timed elements when the sample time precedes the current interval; r=dholbert 2017-10-24 13:06:04 +09:00
storage Bug 1404198: Part 2i - Switch to NS_NewTimer* in dom. r=njn 2017-10-15 23:15:40 -07:00
svg Bug 638054 - Remove or fix tests outside JS using watch/unwatch. r=bz,fitzgen 2017-10-24 20:48:14 +02:00
system Bug 1409579 Only define PATH_MAX if it is not already defined. r=jdm 2017-10-17 18:46:22 -05:00
tests Backed out changeset f67f8342b981 (bug 1357082) on request from jmaher for still high frequency. r=backout a=backout 2017-10-25 13:02:51 +02:00
time
u2f Bug 1403818 - Fix WebAuthn IPC crashes by keeping the child actor alive until process shutdown r=jcj 2017-10-25 15:59:53 +02:00
url Bug 870698 - Part 8: Replace Equals(NS_LITERAL_CSTRING("")) with EqualsLiteral(""). r=erahm 2017-09-06 15:00:31 -07:00
vr merge mozilla-inbound to mozilla-central. r=merge a=merge 2017-10-17 11:45:16 +02:00
webauthn Bug 1403818 - Fix WebAuthn IPC crashes by keeping the child actor alive until process shutdown r=jcj 2017-10-25 15:59:53 +02:00
webbrowserpersist Bug 1409329 - NS_NewBufferedOutputStream should take the ownership of the outputStream, r=smaug 2017-10-24 14:38:23 +02:00
webidl Backed out changeset 2602e10160a1 (bug 1410482) for leaks in devtools tests. r=backout 2017-10-23 23:02:57 +02:00
workers Backed out changeset dab1c5badddb (bug 1407679) for failing server startup in mochitests on Android. r=backout on a CLOSED TREE 2017-10-24 21:18:26 +02:00
worklet
xbl Backed out 4 changesets (bug 1390694) for failing crash test and in reftest/tests/layout/reftests/xul/mac-tab-toolbar.xul r=backout on a CLOSED TREE. 2017-10-20 14:49:52 +03:00
xhr Bug 1405696 - pass the document encoding to NS_NewURI for XMLHttpRequest; r=bkelly 2017-10-20 20:47:36 -04:00
xml Bug 1407056: Part 1 - Provide more consistent principal/origin URL to content policies. r=bz,ckerschb 2017-10-12 15:43:55 -07:00
xslt Bug 1406819 - Remove various bits of dead code from dom/. r=baku 2017-10-11 10:09:13 +01:00
xul Bug 1313150 - Remove |weak| parameter from nsIMutableArray methods. r=froydnj 2017-10-21 23:53:02 +09:00
jar.mn
moz.build