Commit Graph

69 Commits

Author SHA1 Message Date
Birunthan Mohanathas
3926b031ae Bug 784739 - Switch from NULL to nullptr in xpcom/ (2/3); r=ehsan 2013-10-10 16:41:39 -04:00
Kyle Huey
abd89523b8 Bug 919380: Disable threadsafety assertions when --enable-profiling is set. r=smaug 2013-09-24 09:53:40 +08:00
Ehsan Akhgari
d4b0483708 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
60f633a49e Bug 907914: Turn on refcounting threadsafety assertions in opt trunk builds. r=bent 2013-08-30 10:06:37 -07:00
Ms2ger
584215995c 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
8ef412bec4 Bug 901630: Remove support for the cc thread. r=mccr8 2013-08-13 10:45:32 -07:00
Joshua Cranmer
bb26e8f816 Bug 884061 - Part 4: Remove nsAtomicRefcnt.h, r=jlebar
--HG--
extra : rebase_source : ce24ab345baa48104328e3c101b7266a31e81870
2013-07-11 15:21:45 -05:00
Joshua Cranmer
b804383c82 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
0e3b26bd30 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
6767d0a1a8 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
09d2312322 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
cab87a0cce 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
0bafa2c0cd 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
f4f18e6cd9 Bug 845441: Remove DEBUG_CC. r=mccr8 2013-02-26 13:34:32 -08:00
Chris Peterson
c8295d4247 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
7e6dfb3643 Bug 832831 - Make NS_ASSERT_OWNINGTHREAD_AND_NOT_CCTHREAD fatal - r=khuey 2013-01-25 13:40:38 -05:00
Trevor Saunders
63d7222d76 bug 819215 - make NS_IMPL_CYCLE_COLLECTION_XXXCLASS unnecessary r=smaug, mccr8 2012-12-08 00:08:37 -05:00
Benoit Jacob
f4c1a03e74 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
bea8356b2c Bug 792180 - Replace NS_{UN,}LIKELY with MOZ_{UN,}LIKELY; r=ehsan 2012-10-26 15:32:10 +02:00
Olli Pettay
da2e3562f6 Bug 784563 - Investigate being lazier about removing things from the purple buffer, r=mccr8 2012-09-08 13:46:48 +03:00
Luqman Aden
1aa2c9126d 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
0d31841b85 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
Andrew McCreight
8c942e77dd Bug 750570, part 3 - Remove unused stabilizeForDeletion argument. r=smaug
This argument isn't used, and would have to have its type changed
to support native purple buffer participants, so we just remove it.
2012-08-24 09:50:06 -07:00
Andrew McCreight
6a69e406cb Bug 750570, part 2 - Add purple buffer support for non-nsISupports classes. r=smaug
We add a new field to purple buffer entries, to store the participant for
non-nsISupports classes. For nsISupports, we store NULL instead. The participant
has to be passed into Suspect2.

In the cycle collector itself, we generalize canonicalization to handle the
possibility that we can just grab the participant directly from a field,
rather than needing to QI something.

Most of the patch is just routing around this extra pointer.
2012-08-24 09:50:06 -07:00
Ehsan Akhgari
8c296bbcd4 Bug 579517 - Part 1: Automated conversion of NSPR numeric types to stdint types in Gecko; r=bsmedberg
This patch was generated by a script.  Here's the source of the script for
future reference:

function convert() {
echo "Converting $1 to $2..."
find . ! -wholename "*nsprpub*" \
       ! -wholename "*security/nss*" \
       ! -wholename "*/.hg*" \
       ! -wholename "obj-ff-dbg*" \
       ! -name nsXPCOMCID.h \
       ! -name prtypes.h \
         -type f \
      \( -iname "*.cpp" \
         -o -iname "*.h" \
         -o -iname "*.c" \
         -o -iname "*.cc" \
         -o -iname "*.idl" \
         -o -iname "*.ipdl" \
         -o -iname "*.ipdlh" \
         -o -iname "*.mm" \) | \
    xargs -n 1 sed -i -e "s/\b$1\b/$2/g"
}

convert PRInt8 int8_t
convert PRUint8 uint8_t
convert PRInt16 int16_t
convert PRUint16 uint16_t
convert PRInt32 int32_t
convert PRUint32 uint32_t
convert PRInt64 int64_t
convert PRUint64 uint64_t

convert PRIntn int
convert PRUintn unsigned

convert PRSize size_t

convert PROffset32 int32_t
convert PROffset64 int64_t

convert PRPtrdiff ptrdiff_t

convert PRFloat64 double
2012-08-22 11:56:38 -04:00
Aryeh Gregor
57c0ad57fb Bug 777292 part 2 - Change all nsnull to nullptr 2012-07-30 17:20:58 +03:00
Jonathan Watt
9ac7bb2267 Bug 767388 - Kill NS_DEBUG. r=bz.
--HG--
extra : rebase_source : d045208a26345712dbb4628c973c616cd9504f28
2012-06-25 20:59:42 +01:00
Josh Matthews
3e60a1dc11 Bug 722845 - Part 2: Generalize channel private browsing information to a PB consumer interface. r=jduell 2012-05-24 16:31:54 +01:00
Gervase Markham
87620f5676 Bug 716478 - update licence to MPL 2. 2012-05-21 12:12:37 +01:00
Andrew McCreight
7e1f1d540f Bug 738769 - only unmark purple if purple. r=smaug 2012-03-26 09:57:29 -07:00
Olli Pettay
bf505639a0 Bug 716518 - Add skip* phases to cycle collector, r=mccr8
--HG--
extra : rebase_source : c53a42bbbc430384df37d0aeb0d882c09665f672
2012-01-14 18:58:05 +02:00
Kyle Huey
12171860ba Fix Bug 700512. r=sicking,bsmedberg 2011-11-18 10:19:44 -05:00
Ehsan Akhgari
7e4b277a75 Bug 689397 - Work around the broken-ness of gcc4.2 on Mac which causes the protection implemented in bug 666414 not take effect; r=bsmedberg 2011-09-26 20:45:25 -04:00
Michael Wu
d8e503c38b Bug 675553 - Switch from PRBool to bool on a CLOSED TREE , r=bsmedberg,khuey,bz,cjones
--HG--
rename : tools/trace-malloc/bloatblame.c => tools/trace-malloc/bloatblame.cpp
2011-09-28 23:19:26 -07:00
Oleg Romashin
994208d9c8 Bug 682767 - Warning nsISupportsImpl.h: unused owner; r=bsmedberg 2011-08-31 13:16:13 +01:00
Jason Duell
05cec30300 Bug 646373 - Fix AdBlock2 on fennec (nsITraceableChannel.setNewListener() is unimplemented under e10s.) r=honza, a=queue 2011-05-24 02:32:26 -07:00
Peter Van der Beken
afdf1551f1 Fix for bug 584048 (Clean up cycle collection code) - remove NS_IMPL_CYCLE_COLLECTING_ADDREF_AMBIGUOUS/NS_IMPL_CYCLE_COLLECTING_RELEASE_AMBIGUOUS. r=bent. 2011-03-06 12:11:31 +01:00
Ben Turner
fca93ac512 Bug 580096 - 'move the cycle collector off the main thread'. r=peterv+jst 2010-11-11 14:52:30 -08:00
Brian Crowder
6d2f11959b Bug 567267 - Move nsIEncodedChannel logic to base Http class, r=dwitte, blocking-fennec2.0b1=mfinkle 2010-09-15 15:55:08 -07:00
Justin Lebar
3e7e1949d1 Bug 587853 - Use PR_ATOMIC_{INCREMENT,DECREMENT} macros for threadsafe addref / release. r+a2.0=bsmedberg 2010-08-17 10:25:41 -07:00
Saint Wesonga
e7a357dcaf Bug 562387 - Convert NS_NEWXPCOM/NS_DELETEXPCOM to new/delete. r=bsmedberg 2010-07-05 11:42:18 +02:00
Dão Gottwald
9b15b69a1b Backed out changeset 59ace8d80ce8 2010-07-04 22:01:13 +02:00
Saint Wesonga
8dd5da1024 Bug 562387 - Convert NS_NEWXPCOM/NS_DELETEXPCOM to new/delete. r=bsmedberg 2010-07-04 21:39:17 +02:00
Daniel Holbert
eb483b552f Bug 551298, patch A followup i: Add thread safety assertions to AddRef/Release implementations. r=bsmedberg 2010-04-01 11:05:40 -07:00
Daniel Holbert
5192e33d44 Bug 551298, patch A: Move THEBES_INLINE_DECL_REFCOUNTING to xpcom (with s/THEBES/NS/). r=bsmedberg 2010-04-01 11:05:40 -07:00
Daniel Holbert
56db19649c Backed out changeset fe801c8a2090 (Bug 551298) due to Linux debug mochitest-5 orange 2010-04-01 09:40:30 -07:00
Daniel Holbert
ef92ece024 Bug 551298, patch A: Move THEBES_INLINE_DECL_REFCOUNTING to xpcom (with s/THEBES/NS/). r=bsmedberg 2010-04-01 08:07:23 -07:00
Benjamin Smedberg ext:(%2C%20L.%20David%20Baron%20%3Cdbaron%40dbaron.org%3E)
699dcb26a7 Add runtime NS_IsMainThread checks to protect the cycle collector's purple buffer, and make NS_IsMainThread faster on our major platforms. (Bug 521750) r=peterv 2009-10-28 10:28:57 -07:00
L. David Baron
5efb37b7c1 Make cycle collector's purple buffer consist of entries that the objects in the purple buffer can point to, and remove the notion of scan delay (which was previously set to 0). (Bug 490695) r+sr=peterv r=bsmedberg 2009-05-06 13:46:04 -07:00
Boris Zbarsky
0ed08e296f Bug 403199. Don't log addref/release of nsSimpleNestedURI, becuse it doesn't work right when someone addrefs the derived class but releases the base class canonical nsISupports, due to aggregation. r=dbaron 2009-04-09 14:01:16 -04:00