Closed Bug 784728 Opened 8 years ago Closed 8 years ago
Observer is Ref Counted, but pointer is managed manually
I'm currently seeing this on the ARM emulator in debug builds, when exiting the process to apply a new update. It looks like GonkHal.cpp tries to manually delete a BatteryObserver pointer, when BatteryObserver extends RefCounted. Relevant lines of code: http://dxr.mozilla.org/mozilla-central/hal/gonk/GonkHal.cpp.html#280 http://dxr.mozilla.org/mozilla-central/mfbt/RefPtr.h.html#50
You might want to use StaticRefPtr, see bug 772987. And ask jlebar to review the patch.
blocking-basecamp: --- → +
Updated patch to use StaticRefPtr
Comment on attachment 655487 [details] [diff] [review] make sBatteryObserver a StaticRefPtr - v1 r=me. Please push to try and let me know if and when you'd like me to push this patch to m-i for you.
Attachment #655487 - Flags: review?(justin.lebar+bug) → review+
Status: NEW → RESOLVED
Closed: 8 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla18
You need to log in before you can comment on or make changes to this bug.