Invalid use of RefPtr for nsISupport base class.
Categories
(Core :: XPCOM, defect)
Tracking
()
People
(Reporter: jya, Unassigned)
References
Details
I noticed this while flying over the code on an unrelated issue:
https://searchfox.org/mozilla-central/rev/3366c3d24f1c3818df37ec0818833bf085e41a53/dom/media/systemservices/MediaUtils.h#287
nsI* object is stored in nsISupport
Reporter | ||
Comment 1•5 years ago
|
||
Actually, there are over 500 similar misuse code-wise, so I'll do a quick tree-wise find/replace.
Comment 2•5 years ago
|
||
I think the difference between the two is that nsCOMPtr<> checks the canonicity of the nsISupports pointer in debug builds. At least at one point, there was one place in XPConnect that was deliberately using a RefPtr<> because it was holding a non-canonical pointer, but that should be quite rare, or possibly non-existent. But it'll be worth double checking places in js/xpconnect that get changed to see if there are comments about it.
Reporter | ||
Updated•4 years ago
|
Updated•2 years ago
|
Description
•