Commit Graph

97 Commits

Author SHA1 Message Date
Benoit Jacob
00485502a6 Bug 1035394 - Add dangerous public destructor detection to _INHERITED refcounting macros - r=khuey 2014-07-08 17:23:18 -04:00
Benoit Jacob
0809aa5e48 Bug 1028588 - Make XPCOM refcounting assert against public destructors (leaving aside _INHERITED macros for now) - r=khuey 2014-07-07 14:27:32 -04:00
Birunthan Mohanathas
0c931675da Bug 1022456 - Fix modelines in xpcom/{base,glue,io,string,threads}/. r=froydnj 2014-06-30 08:39:45 -07:00
Birunthan Mohanathas
c6232dcfe0 Bug 1022456 - Convert xpcom/glue/ to Gecko style. r=froydnj 2014-06-26 18:35:39 -07:00
Benoit Jacob
ea37f0c6be Bug 1028428 - clang+libc++ still doesn't provide a usable std::is_destructible, so just use the fallback implementation instead - no review, bustage fix 2014-06-21 15:46:27 -04:00
Kyle Huey
95da95656a Bug 1027251: Disable destructor checking on Windows. r=me 2014-06-20 07:33:00 -07:00
Benoit Jacob
f698872409 Bug 1027251 - Enforce that dangerous public destructors must be explicitly whitelisted - r=ehsan 2014-06-20 07:08:25 -04:00
Benoit Jacob
60ee525a4b Bug 1027251 - Initial empty HasDangerousPublicDestructor whitelist - r=ehsan 2014-06-18 22:28:59 -04:00
Ehsan Akhgari
a9b1426983 Bug 1015430 - Fix more XPCOM constructors to clarify whether they should be explicit; r=froydnj 2014-05-25 21:16:01 -04:00
Ehsan Akhgari
897e351e52 Bug 1013664 - Fix bad implicit conversion constructors in XPCOM; r=froydnj
--HG--
extra : rebase_source : e3260a536292175cb1ad23a53dfe9e3f4bb8ff10
2014-05-21 21:33:28 -04:00
Neil Rashbrook
0b29793db8 Bug 514280 Only use nsCOMPtr for interfaces r=bsmedberg 2014-05-11 10:47:11 +01:00
Neil Rashbrook
a998ae77f6 Backout of bug 514280 changeset c738f7348dea for build failure on a CLOSED TREE 2014-05-08 20:35:09 +01:00
Neil Rashbrook
f9520ae677 Bug 514280 Only use nsCOMPtr for interfaces r=bsmedberg 2014-05-08 20:08:38 +01:00
Birunthan Mohanathas
688711cb03 Bug 900908 - Part 4: Remove numbered macros in nsIClassInfoImpl.h/nsISupportsImpl.h. r=froydnj 2014-04-27 03:07:00 -04:00
Birunthan Mohanathas
0983aefecd Bug 900908 - Part 1: Add variadic variants of numbered macros in nsISupportsImpl.h. r=froydnj
The old numbered macros are still present, but simply forward to the variadic
macro. They will be removed after all instances of the numbered macros have
been converted.
2014-04-24 11:20:00 +02:00
Ehsan Akhgari
893357ffa7 Improve the comment about MOZ_COUNT_CTOR/DTOR, text mostly by bent
no bug, DONTBUILD, landed on a CLOSED TREE
2014-04-11 15:41:22 -04:00
Ehsan Akhgari
cca17e36e9 Add a comment to indicate that MOZ_COUNT_CTOR/DTOR should not be used in refcounted objects
no bug, DONTBUILD, landed on a CLOSED TREE
2014-04-11 15:12:38 -04:00
Steve Workman
a7026cfd7d Bug 925623 - Implement NS_IMPL_ISUPPORTS13 r=bsmedberg 2014-03-27 13:54:10 -07:00
Ehsan Akhgari
5b9f45a1a5 Bug 798158 - Part 1: Use a pointer-sized type to store refcounts internally; r=bsmedberg 2014-03-27 16:38:33 -04:00
Nathan Froyd
e12481c9a7 Bug 984443 - get rid of #ifndef $OTHER_HEADER bits from xpcom/ as relics of a bygone era; r=ehsan 2014-03-17 12:20:47 -04:00
L. David Baron
4f04bcdc57 Bug 976350 patch 1: Move the contents of nsTraceRefcnt.h into nsISupportsImpl.h. r=bsmedberg
This makes sense since the file no longer contains anything with the
nsTraceRefcnt name in it, and it will allow renaming nsTraceRefcntImpl
back to nsTraceRefcnt.
2014-02-26 13:36:35 -08:00
Patrick McManus
e3e7849089 bug 751465 - websockets dns and proxies r=jduell r=bsmedberg
--HG--
extra : rebase_source : ad2046a95f1ec9000577cc0f67aedc0766a51ed2
2014-01-06 13:52:42 -05:00
Nathan Froyd
6182f5bef4 Bug 950882 - micro-optimize NS_TableDrivenQI calling sequence by reordering argument list; r=bsmedberg
For register-rich ABIs (e.g. x86-64 and ARM), QueryInterface's incoming
registers are going to look like:

arg register 1: |this|
arg register 2: the IID of interest
arg register 3: the outparam instance pointer

Most of our QI implementations call NS_TableDrivenQI, which expects
arguments like so:

arg register 1: |this|
arg register 2: the QITableEntry table
arg register 3: the IID of interest
arg register 4: the outparam instance pointer

So we're going to have to do a register shuffle of the IID and the
outparam to be able to load the QITableEntry pointer before calling into
NS_TableDrivenQI.

This patch reorders the argument list of NS_TableDrivenQI so that the
first three arguments match the order that QueryInterface receives them
in.  Then your typical QueryInterface implementation becomes:

- load local |table|
- tail-call NS_TableDrivenQI

Eliminating the register shuffling reduces text size by 12K on an
Android ARM build.
2013-12-13 19:50:02 -05:00
Andrew McCreight
5bbea5ab96 Bug 937818, part 1 - Add objects to the purple buffer on AddRef. r=smaug
ICC uses this to track objects that have been AddRef'd during ICC graph building.
For those objects, we may not have the proper information for them, so treat them
as live.
2013-12-17 19:29:57 -08:00
Carsten "Tomcat" Book
72465c7d55 Backed out changeset 261091719842 (bug 937818) for static rooting hazard analysis bustage on a CLOSED TREE 2013-12-17 09:20:51 +01:00
Andrew McCreight
4b4868e59c Bug 937818, part 1 - Add objects to the purple buffer on AddRef. r=smaug
ICC uses this to track objects that have been AddRef'd during ICC graph building.
For those objects, we may not have the proper information for them, so treat them
as live.
2013-12-16 21:30:53 -08:00
Nathan Froyd
cef4749188 Bug 950281 - micro-optimize NS_TableDrivenQI by ensuring the table has at least 1 non-null entry; r=bsmedberg 2013-12-13 19:17:18 -05:00
Andrew McCreight
a1a437b34d Bug 931738 - Remove nsPurpleBufferEntry from nsISupportsImpl.h. r=smaug 2013-11-26 14:29:59 -05:00
Birunthan Mohanathas
4dce3f3fa6 Bug 784739 - Switch from NULL to nullptr in xpcom/ (2/3); r=ehsan 2013-10-10 16:41:39 -04:00
Kyle Huey
dcb855694e Bug 919380: Disable threadsafety assertions when --enable-profiling is set. r=smaug 2013-09-24 09:53:40 +08:00
Ehsan Akhgari
f2b19490e5 Bug 917348 - Part 1: Make NS_IMPL_CYCLE_COLLECTING_AGGREGATED build on non-debug configurations; r=bsmedberg
--HG--
extra : rebase_source : 4984cf31e6855b721dabb27315b4255179aa586d
2013-09-17 12:05:13 -04:00
Kyle Huey
abd285f77e Bug 907914: Turn on refcounting threadsafety assertions in opt trunk builds. r=bent 2013-08-30 10:06:37 -07:00
Ms2ger
585bec8d38 Bug 903844 - Add/update include-what-you-use annotations for various files; r=ehsan+khuey 2013-08-22 08:31:21 +02:00
Kyle Huey
e9e214aa0e Bug 901630: Remove support for the cc thread. r=mccr8 2013-08-13 10:45:32 -07:00
Joshua Cranmer
7b9a04da79 Bug 884061 - Part 4: Remove nsAtomicRefcnt.h, r=jlebar
--HG--
extra : rebase_source : ce24ab345baa48104328e3c101b7266a31e81870
2013-07-11 15:21:45 -05:00
Joshua Cranmer
31ee35bc9b Bug 884061 - Part 2: Add NS_DECL_THREADSAFE_ISUPPORTS, r=jlebar.
--HG--
extra : rebase_source : 70514a7fc7760cadf8608e038d686ad5b2542571
2013-07-13 20:28:54 -05:00
Joshua Cranmer
5de0e3c9a1 Bug 884061 - Part 1: Use mozilla::Atomic in NS_DECL_INLINE_THREADSAFE_REFCOUNTING, r=jlebar
--HG--
extra : rebase_source : a3a987a2a4a52603e0461f40396cca06b6cbe989
2013-07-13 20:18:03 -05:00
Olli Pettay
2bf2214fbe bug 789919, (snow-white) make addref/release of CCable objects faster by removing indirect refcnt increase/decrease, r=mccr8, test changes r=ehsan
--HG--
extra : rebase_source : 2a3b22425c14d6daedc91d62a652c34431acd2fb
2013-07-09 13:30:58 -04:00
Justin Lebar
6c46d0633d Bug 820686 - Remove code after MOZ_CRASH or MOZ_ASSUME_NOT_REACHED. r=(see below)
r=tbsaunde for accessible
r=jmuizelaar for gfx
r=waldo for js
r=roc for layout
r=glandium for mozglue
r=jduell for netwerk
r=khuey for everything else
2013-06-28 18:38:32 -07:00
Justin Lebar
75c400493b Bug 802686 - s/MOZ_NOT_REACHED/MOZ_CRASH/ in Gecko. r=(see below)
r=tbsaunde for accessible
r=jmuizelaar for gfx
r=roc for layout
r=glandium for mozglue
r=jduell for netwerk
r=khuey for everything else

This is a mechanical change made with sed.  Later patches in this queue
clean up the whitespace errors and so on.
2013-06-28 18:38:30 -07:00
Andrew McCreight
fd769e05e8 Bug 866151 - Clean up usage of nsCycleCollector.h and nsCycleCollectorUtils.h. r=smaug,bsmedberg
--HG--
rename : xpcom/base/nsCycleCollector.h => xpcom/glue/nsCycleCollectionJSRuntime.h
2013-04-30 10:41:22 -07:00
Kyle Huey
409e1cc43d Bug 845441: Remove DEBUG_CC. r=mccr8 2013-02-26 13:34:32 -08:00
Chris Peterson
481aeddb5f Bug 839962 - Part 1: Replace some XPCOM refcount NS_ASSERTIONs with MOZ_ASSERTs. r=bsmedberg 2013-02-07 20:50:05 -08:00
Benoit Jacob
86dd08b226 Bug 832831 - Make NS_ASSERT_OWNINGTHREAD_AND_NOT_CCTHREAD fatal - r=khuey 2013-01-25 13:40:38 -05:00
Trevor Saunders
f8c71d8f54 bug 819215 - make NS_IMPL_CYCLE_COLLECTION_XXXCLASS unnecessary r=smaug, mccr8 2012-12-08 00:08:37 -05:00
Benoit Jacob
ee1217da86 Bug 806279 - CC macros refactoring: part 3: fold the TRAVERSE_NATIVE and AMBIGUOUS cases - r=mccr8,smaug 2012-11-15 02:32:39 -05:00
Jacek Szpot
0b35b0e3d8 Bug 792180 - Replace NS_{UN,}LIKELY with MOZ_{UN,}LIKELY; r=ehsan 2012-10-26 15:32:10 +02:00
Olli Pettay
6e4f7ab3ea Bug 784563 - Investigate being lazier about removing things from the purple buffer, r=mccr8 2012-09-08 13:46:48 +03:00
Luqman Aden
cbf3f0b1fd Bug 786008 - Add a debug check to make sure that QueryInterface implementations always handle nsISupports; r=ehsan 2012-08-28 12:33:47 -04:00
Andrew McCreight
62325fa9f3 Bug 750570, part 4 - Switch most native CC classes to use the purple buffer. r=smaug
This patch actually converts over most of the existing native CC classes
to use the participant. This is done by converting them to use
the newly generalized nsCycleCollectingAutoRefCnt instead of their usual
ref count.

This is mostly a matter of defining new macros defining AddRef() and Release()
for native CC classes with the CC ref count.

nsTimeout is left as a legacy native CC class because it is a weird class,
but hopefully eventually it too can be converted over.  See bug 774874.
2012-08-24 09:50:06 -07:00