Граф коммитов

39 Коммитов

Автор SHA1 Сообщение Дата
Jon Coppeard 7c60c2b222 Bug 1624810 - Add a nsCycleCollectionParticipant flag for JS holders that can have GC things in multiple zones r=mccr8
This adds the flag itself and a means of setting it for a cycle collected class.

The proper way to do this would be to add versions of all the NS_DECL_CYCLE_COLLECTION_CLASS macros that also set this flag but we end up needing to create separate versions for five of these and it's a lot of macro code to add.  Here I added a version of NS_IMPL_CYCLE_COLLECTION_CLASS that sets the flag.  This has the disadvantage that it wouldn't work well if we needed to set the flag on a base class as we'd have to use this macro for every derived class.  However that situation doesn't actually arise (and ideally this flag will bet set on the fewest number of classes possible).

Differential Revision: https://phabricator.services.mozilla.com/D68195

--HG--
extra : moz-landing-system : lando
2020-03-26 10:48:30 +00:00
Jon Coppeard ff40627b14 Bug 1624810 - Replace individual nsCycleCollectionParticipant flags with a bit field to make it easier pass multiple flags through derived class oonstructors r=mccr8
Currently classes derived from nsCycleCollectionParicipant have one flag to pass and adding more makes the class delcaration macros get messy really quickly.  This patch replaces boolean flags with a bitfield which makes adding new flags easier.

Differential Revision: https://phabricator.services.mozilla.com/D68194

--HG--
extra : moz-landing-system : lando
2020-03-26 10:48:17 +00:00
Emilio Cobos Álvarez e363a41bd4 Bug 1607595 - Remove uses of mozilla::IsBaseOf. r=froydnj
Automatically generated by:

$ rg 'IsBaseOf<' | cut -d : -f 1 | xargs sed -i 's/mozilla::IsBaseOf</std::is_base_of</g'
$ rg 'IsBaseOf<' | cut -d : -f 1 | xargs sed -i 's/IsBaseOf</std::is_base_of</g

Differential Revision: https://phabricator.services.mozilla.com/D59013

--HG--
extra : moz-landing-system : lando
2020-01-08 14:52:10 +00:00
Jon Coppeard 58e4c9be34 Bug 1587378 - Remove TraceCallbacks method that takes raw JSObject pointers r=mccr8
This method turned out to only be used for tracing wrapper cached things. The wrapper cache has its own way of implementing barriers and contains a raw JSObject pointer. Changing this trace method to take an nsWrapperCache pointer (effectively a JSObjct**) enforces correct use of Heap<T> for other TraceCallbacks callers.

Differential Revision: https://phabricator.services.mozilla.com/D48693

--HG--
extra : moz-landing-system : lando
2019-10-09 14:34:16 +00:00
Mirko Brodesser c0011f4e0f Bug 1557296: replace "IsBlackAndDoesNotNeedTracing" with "HasKnownLiveWrapperAndDoesNotNeedTracing" in nsCycleCollectionParticipant's documentation
Because the latter method was renamed some time ago to the former.

Differential Revision: https://phabricator.services.mozilla.com/D33943
2019-06-11 17:17:27 +02:00
Mirko Brodesser acdd70561f Bug 1556386: rename `aSkip` to `aMightSkip` in nsCycleCollectionParticipant.h. r=mccr8
Because it's more accurate.

Differential Revision: https://phabricator.services.mozilla.com/D33497

--HG--
extra : moz-landing-system : lando
2019-06-03 20:09:40 +00:00
Ehsan Akhgari e5e885ae31 Bug 1521000 - Part 2: Adjust our clang-format rules to include spaces after the hash for nested preprocessor directives r=sylvestre
# ignore-this-changeset

--HG--
extra : amend_source : 7221c8d15a765df71171099468e7c7faa648f37c
extra : histedit_source : a0cce6015636202bff09e35a13f72e03257a7695
2019-01-18 10:16:18 +01:00
Sylvestre Ledru 265e672179 Bug 1511181 - Reformat everything to the Google coding style r=ehsan a=clang-format
# ignore-this-changeset

--HG--
extra : amend_source : 4d301d3b0b8711c4692392aa76088ba7fd7d1022
2018-11-30 11:46:48 +01:00
Sylvestre Ledru 088cb71b59 Bug 1505943 - Add clang-format off to keep the line the same way r=andi
Avoid lint cpp-virtual-final false positive

Differential Revision: https://phabricator.services.mozilla.com/D11476

--HG--
extra : moz-landing-system : lando
2018-11-09 15:09:58 +00:00
Chris Peterson 71422dcaa9 Bug 1457813 - Part 2: Replace non-asserting NS_PRECONDITIONs with MOZ_ASSERTs. r=froydnj
s/NS_PRECONDITION/MOZ_ASSERT/ and reindent

MozReview-Commit-ID: KuUsnVe2h8L

--HG--
extra : source : c14655ab3df2c9b1465dd8102b9d25683359a37b
2018-04-28 12:50:58 -07:00
Kyle Machulis e9c55b249d Bug 1406206 - Remove extraneous else block from cycle collection macros; r=froydnj
clang-tidy is complaining about an extra else in
NS_INTERFACE_MAP_ENTRIES_CYCLE_COLLECTION. Not hurting anything, but
could be cleaned up anyways.

MozReview-Commit-ID: 36Lkdhs3fyN

--HG--
extra : rebase_source : 74088c9c2668f43d55133be240d4591880b60dab
2018-03-14 15:36:59 -07:00
Kyle Machulis 25457d4887 Bug 1402499 - Add NS_IMPL_ISUPPORTS_CYCLE_COLLECTION_INHERITED_0 r=bz
Add macro for nsISupports inheriting classes that need cycle
collection and only inherit from one parent, with no interface table
needed. Takes care of map and addref/release calls.

MozReview-Commit-ID: LtTwYH0DeEz

--HG--
extra : rebase_source : d3650209ddd7e28cbf205ac84f152b9763c26bde
2017-09-28 23:21:09 -07:00
Andrew McCreight e81ef49017 Bug 1390660, part 3 - Make QIing to a few CCed classes faster. r=peterv
QIing to CC interfaces shows up in Speedometer profiles for a few
classes. Presumably there are many of these objects being created and
destroyed. By making these classes check first for the CC interfaces
directly, rather than going up the inheritance chain, this overhead
should be reduced.

MozReview-Commit-ID: I3sf3my8oua

--HG--
extra : rebase_source : f08884a944d5b4ed1eb1da1070de64f21fc9868a
2017-08-16 14:31:40 -07:00
Andrew McCreight 64b725c5cd Bug 1390660, part 2 - Define and use a new macro for CC isupports. r=peterv
The main purpose of defining this is to make conversion of places that
use the non-CC variant easier. There are many more places that could
be converted to use these new macros, if somebody felt motivated.

MozReview-Commit-ID: HspjcN76fjg

--HG--
extra : rebase_source : bf3baa586f90f0afbe9229c32d38cb34cc909b9b
2017-08-16 13:14:11 -07:00
Andrew McCreight 78807d8776 Bug 1391005 - Eliminate NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION_INHERITED. r=peterv
Replace it with NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION, because it
has been the same for a while.

MozReview-Commit-ID: 5agRGFyUry1

--HG--
extra : rebase_source : 5388c56b2f6905c6ef969150f0c5b77bf247624d
2017-08-29 16:02:48 -07:00
Andrew McCreight d3b91aeeda Bug 1390692 - Remove the unnecessary second QI entry for nsCycleCollectionISupports. r=peterv
MozReview-Commit-ID: 4o2QZhdomg2

--HG--
extra : rebase_source : a18e94cf45003fa25455d1d69c04e8ccc3e0fd74
2017-08-22 12:51:10 -07:00
Ehsan Akhgari 047b7f969e Bug 1384821 - Optimize inherited cycle-collectible QueryInterface() implementations for nsCycleCollectionISupports; r=peterv 2017-08-14 12:42:01 -04:00
Mike Hommey c1becb4a54 Bug 1368932 - Allow MOZ_PASTE_PREFIX_AND_ARG_COUNT to work with 0 arguments. r=froydnj
At the same time, remove the MOZ_STATIC_ASSERT_VALID_ARG_COUNT, which
doesn't actually work for more than 50 arguments(*), and which is now not
useful to detect 0 arguments.

(*) the build fails, but not directly thanks to the static_assert it
expands to.

--HG--
extra : rebase_source : 8f0fe7b352c89b5a3ec87f42ef5464c370c362ef
2017-05-25 15:47:21 +09:00
Boris Zbarsky 923745b8ea Bug 1332321. Make all cycle collection participants explicitly say whether they need skippability themselves, or just want whatever skippability their descendants want. r=mccr8
This way we can't end up with a situation in which an ancestor doesn't care about skippability but a descendant does and doesn't get it, because the ancestor just claimed no skippability was needed.
2017-01-24 16:11:56 -05:00
Benjamin Smedberg d478e7c99f Bug 1332631 part B - file moves from xpcom/glue to xpcom/base, r=froydnj
MozReview-Commit-ID: ARS1aTugYjl

--HG--
rename : xpcom/glue/AutoRestore.h => xpcom/base/AutoRestore.h
rename : xpcom/glue/EnumeratedArrayCycleCollection.h => xpcom/base/EnumeratedArrayCycleCollection.h
rename : xpcom/glue/IntentionalCrash.h => xpcom/base/IntentionalCrash.h
rename : xpcom/glue/nsCOMPtr.cpp => xpcom/base/nsCOMPtr.cpp
rename : xpcom/glue/nsCOMPtr.h => xpcom/base/nsCOMPtr.h
rename : xpcom/glue/nsCRTGlue.cpp => xpcom/base/nsCRTGlue.cpp
rename : xpcom/glue/nsCRTGlue.h => xpcom/base/nsCRTGlue.h
rename : xpcom/glue/nsClassInfoImpl.cpp => xpcom/base/nsClassInfoImpl.cpp
rename : xpcom/glue/nsCycleCollectionNoteChild.h => xpcom/base/nsCycleCollectionNoteChild.h
rename : xpcom/glue/nsCycleCollectionNoteRootCallback.h => xpcom/base/nsCycleCollectionNoteRootCallback.h
rename : xpcom/glue/nsCycleCollectionParticipant.cpp => xpcom/base/nsCycleCollectionParticipant.cpp
rename : xpcom/glue/nsCycleCollectionParticipant.h => xpcom/base/nsCycleCollectionParticipant.h
rename : xpcom/glue/nsCycleCollectionTraversalCallback.h => xpcom/base/nsCycleCollectionTraversalCallback.h
rename : xpcom/glue/nsDebug.h => xpcom/base/nsDebug.h
rename : xpcom/glue/nsIClassInfoImpl.h => xpcom/base/nsIClassInfoImpl.h
rename : xpcom/glue/nsID.cpp => xpcom/base/nsID.cpp
rename : xpcom/glue/nsID.h => xpcom/base/nsID.h
rename : xpcom/glue/nsIInterfaceRequestorUtils.cpp => xpcom/base/nsIInterfaceRequestorUtils.cpp
rename : xpcom/glue/nsIInterfaceRequestorUtils.h => xpcom/base/nsIInterfaceRequestorUtils.h
rename : xpcom/glue/nsINIParser.cpp => xpcom/base/nsINIParser.cpp
rename : xpcom/glue/nsINIParser.h => xpcom/base/nsINIParser.h
rename : xpcom/glue/nsISupportsImpl.cpp => xpcom/base/nsISupportsImpl.cpp
rename : xpcom/glue/nsISupportsImpl.h => xpcom/base/nsISupportsImpl.h
rename : xpcom/glue/nsISupportsUtils.h => xpcom/base/nsISupportsUtils.h
rename : xpcom/glue/nsIWeakReferenceUtils.h => xpcom/base/nsIWeakReferenceUtils.h
rename : xpcom/glue/nsMemory.cpp => xpcom/base/nsMemory.cpp
rename : xpcom/glue/nsMemory.h => xpcom/base/nsMemory.h
rename : xpcom/glue/nsTWeakRef.h => xpcom/base/nsTWeakRef.h
rename : xpcom/glue/nsVersionComparator.cpp => xpcom/base/nsVersionComparator.cpp
rename : xpcom/glue/nsVersionComparator.h => xpcom/base/nsVersionComparator.h
rename : xpcom/glue/nsWeakReference.cpp => xpcom/base/nsWeakReference.cpp
rename : xpcom/glue/nsWeakReference.h => xpcom/base/nsWeakReference.h
extra : rebase_source : df11b181f383b70ffe5051716d63ed11b98be53b
extra : histedit_source : 6d0743fac0562e4676e44a52f0e85375fb4a44ff
2017-01-23 09:24:01 -05:00
benjamin@smedbergs.us 5fb457dd7e Bug 386025 - Expose cycle-collection symbols, r=graydon 2007-08-06 07:34:02 -07:00
neil@parkwaycc.co.uk 10de8387c8 Followup to bug 348748 to fix the alignment of trailing backslashes in macros
[xxx_cast<foo*>(bar) is three characters shorter than NS_XXX_CAST(foo*, bar)]
2007-07-11 01:46:44 -07:00
jwalden@mit.edu 6d7584839a Bug 348748 - Replace all instances of NS_STATIC_CAST and friends with C++ casts (and simultaneously bitrot nearly every patch in existence). r=bsmedberg on the script that did this. Tune in next time for Macro Wars: Episode II: Attack on the LL_* Macros. 2007-07-08 00:08:04 -07:00
peterv@propagandism.org aba8c5dc41 Fix warning. 2007-05-25 03:57:38 -07:00
peterv@propagandism.org 5acbaf5478 Fix for bug 368774 (Make cycle collector work with refcounted non-XPCOM objects). r=dbaron, sr=sicking. 2007-05-24 07:10:02 -07:00
peterv@propagandism.org f091506c2b Fix for bug 378595 (Improve cycle collection QI performance). r/sr=sicking. 2007-04-25 09:35:27 -07:00
peterv@propagandism.org a3211baf40 Fix for bug 372110 (Make cycle-collection debugging features optional at compile time). r=graydon, sr=jst. 2007-04-21 10:43:19 -07:00
peterv%propagandism.org 5a1ed9c668 Fix for bug 374096 (Cycle collector doesn't collect all the cycles it could). r=graydon, sr=dbaron. 2007-03-16 12:52:47 +00:00
peterv%propagandism.org a267e57680 Fix for bug 373219 (ASSERTION: Fault in cycle collector: null XPCOM pointer returned (ptr: 0)). r/sr=dbaron. 2007-03-09 13:14:06 +00:00
peterv%propagandism.org 47188a2f94 Try to fix bustage. 2007-03-08 11:31:14 +00:00
peterv%propagandism.org 12f2917956 Fix for bug 368773 (Add a bunch of DOM objects to cycle collection). r=sicking, sr=jst. 2007-03-08 11:17:16 +00:00
peterv%propagandism.org 3e4c261c01 Fix for bug 367779 (Make cycle collection through JS objects more reliable). r=jst, sr=brendan. 2007-02-18 20:05:32 +00:00
peterv%propagandism.org 0e04a8b0f2 Fix for bug 368549 (Cycle collector doesn't handle tearoffs correctly). r=graydon, sr=jst. 2007-02-18 14:38:04 +00:00
jonas%sicking.cc 073b1fd3fe Bug 370332: Kill nsIBindingManager and nsIStyleRuleSupplier. r=dbaron for the layout/style parts, r/sr=jst for the rest. 2007-02-16 23:02:08 +00:00
gerv%gerv.net 8e8acc58af Bug 236613: change to MPL/LGPL/GPL tri-license. 2007-02-14 17:33:38 +00:00
graydon%mozilla.com 40e2228cd0 Bug 366063: better fix to critical crasher, replacing band-aid submitted in 333078.
r=dbaron
2007-01-09 01:33:02 +00:00
graydon%mozilla.com 4525ab79d9 Bug 333078: XPCOM cycle collector
r=brendan, sicking, bz, dbaron, bsmedberg
2007-01-04 22:31:26 +00:00
vladimir%pobox.com 82a10357c9 backing out bug 333078, xpcom cycle collector due to perf issues 2006-11-22 23:18:16 +00:00
vladimir%pobox.com 3748c8bf4f b=333078, xpcom cycle collector -- patch from graydon@mozilla.com, r=many 2006-11-22 19:23:02 +00:00