Closed
Bug 1617628
Opened 6 years ago
Closed 6 years ago
Hide base class Put overloads in nsRefPtrHashtable to avoid implicit refcounting
Categories
(Core :: XPCOM, task)
Core
XPCOM
Tracking
()
RESOLVED
FIXED
mozilla75
| Tracking | Status | |
|---|---|---|
| firefox75 | --- | fixed |
People
(Reporter: sg, Assigned: sg)
Details
Attachments
(1 external file)
Within https://phabricator.services.mozilla.com/D63865#inline-383441, it turned out that nsRefPtrHashtable::Put might be called with a RefPtr being implicitly cast into a raw pointer, where moving it might actually be intended or at least possible. This is because the nsBaseHashtable::Put overloads are explicitly made visible by https://searchfox.org/mozilla-central/rev/96f1457323cc598a36f5701f8e67aedaf97acfcf/xpcom/ds/nsRefPtrHashtable.h#54
It would be desirable to hide these overloads to avoid unintentional refcounting.
| Assignee | ||
Comment 1•6 years ago
|
||
There actually are several places in the current code base where a RefPtr could be moved, which will be fixed as part of this bug.
| Assignee | ||
Comment 2•6 years ago
|
||
| Assignee | ||
Updated•6 years ago
|
Status: NEW → ASSIGNED
Updated•6 years ago
|
Attachment #9128538 -
Attachment description: Bug 1617628 - Hide nsBaseHashtable Put overloads in nsRefPtrHashtable subclass. → Bug 1617628 - Hide nsBaseHashtable Put overloads in nsRefPtrHashtable subclass. r=froydnj
Pushed by sgiesecke@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/76383a875678
Hide nsBaseHashtable Put overloads in nsRefPtrHashtable subclass. r=froydnj
Comment 4•6 years ago
|
||
| bugherder | ||
Status: ASSIGNED → RESOLVED
Closed: 6 years ago
status-firefox75:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla75
Pushed by mkmelin@iki.fi:
https://hg.mozilla.org/comm-central/rev/b6948968da8c
Port "Hide nsBaseHashtable Put overloads in nsRefPtrHashtable subclass" to Thunderbird rs=bustage-fix
You need to log in
before you can comment on or make changes to this bug.
Description
•