Remove unnecessary kungFuDeathGrip in nsObserverService::RemoveObserver
Categories
(Core :: XPCOM, defect)
Tracking
()
Tracking | Status | |
---|---|---|
firefox77 | --- | fixed |
People
(Reporter: peterv, Assigned: peterv)
Details
Attachments
(1 file)
Timeless completely misdiagnosed the problem in bug 325392 and then applied a generic fix in bug 485834 based on the wrong diagnosis. The problem in bug 325392 was not that we were calling nsObserverService::RemoveObserver from the destructor, and then reentering the destructor. The refcounting code stabilizes the refcount to 1 before calling the destructor to avoid reentering a destructor. The real problem was that we were deleting an XPCOM object manually after creation but without ever holding a strong reference to it, and so not going through the refcount stabilization (and then the destructor can reenter of course).
The generic fix in bug 485834 was based on the spotfix in bug 325392, that was then backed out when the proper fix for that bug landed. I don't think we should keep this kungfuDeathGrip, I ran into it because it causes issues with refcount logging (refcount logging always had an issue with refcounting from a destructor).
Assignee | ||
Comment 1•4 years ago
|
||
Updated•4 years ago
|
Pushed by pvanderbeken@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/7805c1104fa5 Remove unnecessary kungFuDeathGrip. r=erahm
Comment 3•4 years ago
|
||
bugherder |
Description
•