Closed Bug 1329512 Opened 9 years ago Closed 9 years ago

Make IsRefcountedSmartPointer and RemoveSmartPointer const&volatile-resistant

Categories

(Core :: XPCOM, defect)

49 Branch
defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla53
Tracking Status
firefox53 --- fixed

People

(Reporter: mozbugz, Assigned: mozbugz)

References

Details

Attachments

(2 files)

Currently IsRefcountedSmartPointer and RemoveSmartPointer only recognize RefPtr<T> and nsCOMPtr<T>, so if given a const and/or volatile smart pointer, it wouldn't be handled correctly. The simplest solution would be to copy what was done for RemovePointer in mfbt/TypeTraits.h.
Comment on attachment 8824830 [details] Bug 1329512 - Move *SmartPointer classes higher in the file - https://reviewboard.mozilla.org/r/103100/#review103888
Attachment #8824830 - Flags: review?(nfroyd) → review+
Comment on attachment 8824831 [details] Bug 1329512 - Make IsRefcountedSmartPointer and RemoveSmartPointer const&volatile-resistant - https://reviewboard.mozilla.org/r/103102/#review103890 Can you add `static_assert`-style tests for these in `xpcom/tests/gtest/TestThreadUtils.cpp`?
Attachment #8824831 - Flags: review?(nfroyd) → review+
Pushed by gsquelart@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/d2690a46c1f7 Move *SmartPointer classes higher in the file - r=froydnj https://hg.mozilla.org/integration/autoland/rev/db57e285593d Make IsRefcountedSmartPointer and RemoveSmartPointer const&volatile-resistant - r=froydnj
Status: NEW → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla53
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: