Closed
Bug 1295763
Opened 8 years ago
Closed 8 years ago
Allow ThreadSafeAutoRefCnt with XPCOM_GLUE
Categories
(Core :: XPCOM, defect)
Tracking
()
RESOLVED
FIXED
mozilla51
Tracking | Status | |
---|---|---|
firefox51 | --- | fixed |
People
(Reporter: mozbugz, Assigned: mozbugz)
References
(Blocks 1 open bug)
Details
Attachments
(1 file)
As I was trying to introduce some thread-safe ref-counted structures in xpcom/glue, I discovered that three years ago, bug 884061 made thread-safe ref-counting use mozilla::Atomics, which depends on <atomic>, which because of build dependencies then could not be #included from XPCOM_GLUE code; and therefore 'ThreadSafeAutoRefCnt' was forcefully #ifndef'd-out in XPCOM_GLUE code, making thread-safe ref-counting unusable in this case. (See bug 884061 comment 91) Since it was a long time ago, and that bug didn't get its promised follow-up, and I think Atomics have had some work done, I just tried removing the crippling |#ifndef XPCOM_GLUE|'s and everything compiled just fine: https://treeherder.mozilla.org/#/jobs?repo=try&revision=d7ffd66645540383e680795138a0d49dadb34055 It's not obvious there, but that try includes my proposed patch https://hg.mozilla.org/try/rev/1ad7e862655a Also the 'timerutils WIP' patch shows the new code that would not compile otherwise. I'm not sure yet whether that code will be accepted & stay there, so it could all end up being a moot point. Anyway I think we should just get rid of these old limitations if possible, as it has hurt people from the start (bug 884061 comment 90).
Comment hidden (mozreview-request) |
Assignee | ||
Updated•8 years ago
|
Attachment #8781737 -
Flags: review?(Pidgeot18) → review?(nfroyd)
Comment 2•8 years ago
|
||
mozreview-review |
Comment on attachment 8781737 [details] Bug 1295763 - Allow ThreadSafeAutoRefCnt with XPCOM_GLUE - https://reviewboard.mozilla.org/r/72084/#review72000
Attachment #8781737 -
Flags: review?(nfroyd) → review+
Pushed by gsquelart@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/b004e438bdc9 Allow ThreadSafeAutoRefCnt with XPCOM_GLUE - r=froydnj
Comment 4•8 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/b004e438bdc9
Status: NEW → RESOLVED
Closed: 8 years ago
status-firefox51:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla51
You need to log in
before you can comment on or make changes to this bug.
Description
•