Closed
Bug 931738
Opened 11 years ago
Closed 11 years ago
Remove nsPurpleBufferEntry from nsISupportsImpl.h and XPCOM goop
Categories
(Core :: XPCOM, defect)
Core
XPCOM
Tracking
()
RESOLVED
FIXED
mozilla28
People
(Reporter: mccr8, Assigned: mccr8)
References
(Blocks 1 open bug)
Details
(Whiteboard: [qa-])
Attachments
(1 file)
3.27 KB,
patch
|
smaug
:
review+
|
Details | Diff | Splinter Review |
I just realized that since snow-white landed, there's no references to nsPurpleBufferEntry outside of nsCycleCollector.cpp itself, so we could move the definition out of nsISupportsImpl.h, and from various bits of XPCOM that mention it.
Assignee | ||
Updated•11 years ago
|
Assignee: nobody → continuation
Assignee | ||
Comment 1•11 years ago
|
||
Attachment #8338614 -
Flags: review?(bugs)
Assignee | ||
Comment 2•11 years ago
|
||
Comment 3•11 years ago
|
||
Comment on attachment 8338614 [details] [diff] [review]
remove nsPurpleBufferEntry from nsISupportsImpl.h. r=smaug
># HG changeset patch
># User Andrew McCreight <continuation@gmail.com>
>
>Bug 931738 - remove nsPurpleBufferEntry from nsISupportsImpl.h. r=smaug
>
>diff --git a/xpcom/base/nsCycleCollector.cpp b/xpcom/base/nsCycleCollector.cpp
>index 7b09c29..4218376 100644
>--- a/xpcom/base/nsCycleCollector.cpp
>+++ b/xpcom/base/nsCycleCollector.cpp
>@@ -726,16 +726,27 @@ CanonicalizeParticipant(void **parti, nsCycleCollectionParticipant **cp)
> "Don't add objects that don't participate in collection!");
> nsXPCOMCycleCollectionParticipant *xcp;
> ToParticipant(nsparti, &xcp);
> *parti = nsparti;
> *cp = xcp;
> }
> }
>
>+struct nsPurpleBufferEntry {z
>+ union {
>+ void *mObject; // when low bit unset
>+ nsPurpleBufferEntry *mNextInFreeList; // when low bit set
>+ };
>+
>+ nsCycleCollectingAutoRefCnt *mRefCnt;
>+
>+ nsCycleCollectionParticipant *mParticipant; // nullptr for nsISupports
>+};
>+
> class nsCycleCollector;
>
> struct nsPurpleBuffer
> {
> private:
> struct Block {
> Block *mNext;
> // Try to match the size of a jemalloc bucket, to minimize slop bytes.
>diff --git a/xpcom/build/nsXPCOM.h b/xpcom/build/nsXPCOM.h
>index 26248e7..576a930 100644
>--- a/xpcom/build/nsXPCOM.h
>+++ b/xpcom/build/nsXPCOM.h
>@@ -26,17 +26,16 @@ DECL_CLASS(nsIComponentManager);
> DECL_CLASS(nsIComponentRegistrar);
> DECL_CLASS(nsIServiceManager);
> DECL_CLASS(nsIFile);
> DECL_CLASS(nsILocalFile);
> DECL_CLASS(nsIDirectoryServiceProvider);
> DECL_CLASS(nsIMemory);
> DECL_CLASS(nsIDebug);
> DECL_CLASS(nsITraceRefcnt);
>-DECL_STRUCT(nsPurpleBufferEntry);
>
> #ifdef __cplusplus
> namespace mozilla {
> struct Module;
> }
> #endif
>
> /**
>diff --git a/xpcom/build/nsXPCOMPrivate.h b/xpcom/build/nsXPCOMPrivate.h
>index 62db79d..c29678a 100644
>--- a/xpcom/build/nsXPCOMPrivate.h
>+++ b/xpcom/build/nsXPCOMPrivate.h
>@@ -10,16 +10,17 @@
> #include "nscore.h"
> #include "nsXPCOM.h"
> #include "nsXPCOMStrings.h"
> #include "xptcall.h"
>
> class nsStringContainer;
> class nsCStringContainer;
> class nsIComponentLoader;
>+class nsPurpleBufferEntry;
>
> /**
> * During this shutdown notification all threads which run XPCOM code must
> * be joined.
> */
> #define NS_XPCOM_SHUTDOWN_THREADS_OBSERVER_ID "xpcom-shutdown-threads"
>
> /**
>diff --git a/xpcom/glue/nsISupportsImpl.h b/xpcom/glue/nsISupportsImpl.h
>index be95a79..bd09a65 100644
>--- a/xpcom/glue/nsISupportsImpl.h
>+++ b/xpcom/glue/nsISupportsImpl.h
>@@ -69,27 +69,16 @@ private:
> #define NS_DECL_OWNINGTHREAD /* nothing */
> #define NS_ASSERT_OWNINGTHREAD_AGGREGATE(agg, _class) ((void)0)
> #define NS_ASSERT_OWNINGTHREAD(_class) ((void)0)
>
> #endif // DEBUG || (NIGHTLY_BUILD && !MOZ_PROFILING)
>
> // Support for ISupports classes which interact with cycle collector.
>
>-struct nsPurpleBufferEntry {
>- union {
>- void *mObject; // when low bit unset
>- nsPurpleBufferEntry *mNextInFreeList; // when low bit set
>- };
>-
>- nsCycleCollectingAutoRefCnt *mRefCnt;
>-
>- nsCycleCollectionParticipant *mParticipant; // nullptr for nsISupports
>-};
>-
> #define NS_NUMBER_OF_FLAGS_IN_REFCNT 2
> #define NS_IN_PURPLE_BUFFER (1 << 0)
> #define NS_IS_PURPLE (1 << 1)
> #define NS_REFCOUNT_CHANGE (1 << NS_NUMBER_OF_FLAGS_IN_REFCNT)
> #define NS_REFCOUNT_VALUE(_val) (_val >> NS_NUMBER_OF_FLAGS_IN_REFCNT)
>
> class nsCycleCollectingAutoRefCnt {
Attachment #8338614 -
Flags: review?(bugs) → review+
Assignee | ||
Updated•11 years ago
|
Keywords: checkin-needed
Comment 4•11 years ago
|
||
Keywords: checkin-needed
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla28
Updated•11 years ago
|
Whiteboard: [qa-]
You need to log in
before you can comment on or make changes to this bug.
Description
•