Closed
Bug 1123110
Opened 9 years ago
Closed 9 years ago
Clarify the ownership of several cycle collector members; r=smaug
Categories
(Core :: XPCOM, defect)
Core
XPCOM
Tracking
()
RESOLVED
FIXED
mozilla38
People
(Reporter: ehsan.akhgari, Assigned: ehsan.akhgari)
References
Details
Attachments
(1 file)
2.73 KB,
patch
|
mccr8
:
review+
|
Details | Diff | Splinter Review |
No description provided.
Assignee | ||
Updated•9 years ago
|
Assignee: nobody → ehsan
Assignee | ||
Comment 1•9 years ago
|
||
Attachment #8550945 -
Flags: review?(bugs)
Comment 2•9 years ago
|
||
Comment on attachment 8550945 [details] [diff] [review] Clarify the ownership of several cycle collector members Review of attachment 8550945 [details] [diff] [review]: ----------------------------------------------------------------- Thanks. ::: xpcom/base/nsCycleCollector.cpp @@ +1256,5 @@ > CCGraph mGraph; > nsAutoPtr<CCGraphBuilder> mBuilder; > nsCOMPtr<nsICycleCollectorListener> mListener; > > + nsCOMPtr<nsIThread> mThread; This could be made DebugOnly<void*> or void*, as we only compare it with pointers. @@ +1270,5 @@ > > uint32_t mUnmergedNeeded; > uint32_t mMergedInARow; > > + JSPurpleBuffer* MOZ_OWNING_REF mJSPurpleBuffer; This could probably be an nsRefPtr<JSPurpleBuffer>. You'd just have to change the ctor of JSPurpleBuffer and JSPurpleBuffer::mReferenceToThis to an nsRefPtr<>. Then you could ditch the NS_ADDREF/RELEASE_THIS in JSPurpleBuffer. If you don't want to do that, I guess I can file a followup bug.
Attachment #8550945 -
Flags: review?(bugs) → review+
Comment 3•9 years ago
|
||
There was some reason for the unusual addref/release_this... But if we can use nsRefPtr there, good.
Assignee | ||
Comment 4•9 years ago
|
||
Consider it done!
Comment 5•9 years ago
|
||
https://hg.mozilla.org/mozilla-central/rev/7e6b191f83f7
Status: NEW → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla38
You need to log in
before you can comment on or make changes to this bug.
Description
•