gecko-dev/xpcom
Andrew McCreight e2ebefc242 Bug 1207368 - Use swap() instead of forget() to remove MessageElement::mMessage. r=froydnj
Using forget() to extract mMessage from MessageElement ends up going
from nsCOMPtr<T> to already_AddRefed<T> to nsCOMPtr<T>. For the second
step, the compiler can't tell that the already_AddRefed<T> came from a
canonical nsCOMPtr, so it calls Assert_NoQueryNeeded() in debug
builds. This in turn causes a QI, which does an AddRef. That is bad
because we're not on the main thread, and mMessage is
main-thread-only, so we get an assertion.

This patch works around that by using swap directly between two
nsCOMPtr<>, which avoids the Assert_NoQueryNeeded().

I called the method "swapMessage" rather than "swap" to emphasize that
we are not swapping the whole MessageElement, but just one part of
it. I find the existing forget() name to be confusing.
2015-10-02 14:47:13 -07:00
..
base Bug 1207368 - Use swap() instead of forget() to remove MessageElement::mMessage. r=froydnj 2015-10-02 14:47:13 -07:00
build Bug 1207287: Move the app-shipped system add-ons somewhere where they will be included in up date MARs. r=froydnj r=rhelmer 2015-09-24 16:03:01 -07:00
components Bug 1210463 - part 3 - Remove the very obsolete NS_IMPL_MOZILLA192_NSGETMODULE. r=froydnj 2015-10-01 15:53:38 -07:00
doc
ds Bug 1201135 - Rename pldhash.{h,cpp} to PLDHashTable.{h,cpp}. r=mccr8. 2015-09-15 20:49:53 -07:00
glue Bug 1210871 - don't use reinterpret_cast in nsTHashtable.h; r=erahm 2015-10-02 20:32:15 -04:00
idl-parser
io Bug 1203680 P4 Fix bug in nsStorageStream with reading streams created before data is populated. r=froydnj 2015-09-15 10:15:45 -07:00
libxpcomrt Bug 1201135 - Rename pldhash.{h,cpp} to PLDHashTable.{h,cpp}. r=mccr8. 2015-09-15 20:49:53 -07:00
libxpt/xptcall
reflect bug 681602 - Implement xptcall for arm iOS. r=glandium 2015-09-23 09:57:10 -04:00
string Bug 1204403 - Fix -Wshadow warnings in xpcom. r=mccr8 2015-09-07 23:56:16 -07:00
system Bug 1207030 - Enable -Wshadow flag in more directories that have no -Wshadow warnings. r=glandium 2015-09-22 21:39:03 -07:00
tests Bug 1207499 - Part 13: Remove use of expression closure from xpcom/. r=froydnj 2015-09-23 18:42:20 +09:00
threads Backed out 6 changesets (bug 1186745) for android Cpp failures 2015-10-02 10:35:09 -07:00
typelib Bug 1204403 - Fix -Wshadow warnings in xpcom. r=mccr8 2015-09-07 23:56:16 -07:00
windbgdlg
xpidl
Makefile.in
moz.build
xpcom-config.h.in
xpcom-private.h.in