Closed
Bug 1168169
Opened 9 years ago
Closed 7 years ago
Change nsThreadShutdownContext::joiningThread to use nsRefPtr and mark as MOZ_STACK_CLASS
Categories
(Core :: XPCOM, defect)
Core
XPCOM
Tracking
()
RESOLVED
FIXED
mozilla55
Tracking | Status | |
---|---|---|
firefox55 | --- | fixed |
People
(Reporter: nika, Assigned: nika)
Details
Attachments
(1 file, 3 obsolete files)
1.07 KB,
patch
|
froydnj
:
review+
|
Details | Diff | Splinter Review |
Assignee | ||
Comment 1•9 years ago
|
||
Assignee | ||
Updated•9 years ago
|
Attachment #8610197 -
Flags: review?(benjamin)
Updated•9 years ago
|
Attachment #8610197 -
Flags: review?(benjamin) → review?(nfroyd)
Comment 2•9 years ago
|
||
Comment on attachment 8610197 [details] [diff] [review] Change nsThreadShutdownContext::joiningThread to use nsRefPtr and mark as MOZ_STACK_CLASS Review of attachment 8610197 [details] [diff] [review]: ----------------------------------------------------------------- r=me with the change below. ::: xpcom/threads/nsThread.cpp @@ +235,2 @@ > { > + nsRefPtr<nsThread> joiningThread; I don't think there's any need for refcounting this; the thread manager is holding a reference to |joiningThread| and isn't going to let that go while we're running the code in question. Like other cases, this can be MOZ_NON_OWNING_REF.
Attachment #8610197 -
Flags: review?(nfroyd) → review+
Assignee | ||
Comment 3•9 years ago
|
||
I think that MOZ_UNSAFE_REF would be a more appropriate annotation in this scenario.
Attachment #8610197 -
Attachment is obsolete: true
Attachment #8623092 -
Flags: review?(nfroyd)
Comment 4•9 years ago
|
||
Comment on attachment 8623092 [details] [diff] [review] Mark nsThreadShutdownContext::joiningThread as MOZ_UNSAFE_REF and mark as MOZ_STACK_CLASS Review of attachment 8623092 [details] [diff] [review]: ----------------------------------------------------------------- *shrug* OK.
Attachment #8623092 -
Flags: review?(nfroyd) → review+
Assignee | ||
Comment 6•7 years ago
|
||
I guess this is what happens when you forget to mark yourself as the assignee :P. MozReview-Commit-ID: 16ebijitZcz
Assignee | ||
Updated•7 years ago
|
Attachment #8623092 -
Attachment is obsolete: true
Assignee | ||
Comment 7•7 years ago
|
||
Looking at this more it seems like the situation has changed since this patch was originally written. nsThreadShutdownContext is allocated on the heap behind a nsAutoPtr, so we can't mark it as MOZ_STACK_CLASS. MozReview-Commit-ID: 16ebijitZcz
Attachment #8858896 -
Flags: review?(nfroyd)
Assignee | ||
Updated•7 years ago
|
Attachment #8858891 -
Attachment is obsolete: true
Assignee | ||
Updated•7 years ago
|
Assignee: nobody → michael
Flags: needinfo?(michael)
Comment 8•7 years ago
|
||
Comment on attachment 8858896 [details] [diff] [review] Mark nsThreadShutdownContext::joiningThread as MOZ_UNSAFE_REF Review of attachment 8858896 [details] [diff] [review]: ----------------------------------------------------------------- Thanks. Does the static analysis look through templated types to find raw pointers? The documentation for MOZ_UNSAFE_REF says it only applies to pointers...please be sure that you're not going to break the static analysis jobs before you land this.
Attachment #8858896 -
Flags: review?(nfroyd) → review+
Pushed by michael@thelayzells.com: https://hg.mozilla.org/integration/mozilla-inbound/rev/14f4b3a2ca15 Mark nsThreadShutdownContext::joiningThread as MOZ_UNSAFE_REF, r=froydnj
Comment 10•7 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/14f4b3a2ca15
Status: NEW → RESOLVED
Closed: 7 years ago
status-firefox55:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla55
You need to log in
before you can comment on or make changes to this bug.
Description
•