Open
Bug 1678307
Opened 5 years ago
Updated 4 years ago
Avoid requiring a full definition of the PtrType for instantiating nsRefPtrHashtable
Categories
(Core :: XPCOM, task)
Core
XPCOM
Tracking
()
NEW
People
(Reporter: sg, Unassigned)
References
(Blocks 1 open bug)
Details
A significant contributor to include dependencies is the fact that instantiating nsRefPtrHashtable<Key, Pointee> requires a full definition of Pointee, and a forward declaration of Pointee is not sufficient.
One example where this leads to significant extra include dependencies is gfx/layers/LayerManager.h, which only needs to include mozilla/dom/Animation.h for a member of type nsRefPtrHashtable<nsUint64HashKey, dom::Animation>. This doesn't seem necessary. RefPtr<Pointee> itself can be instantiated without a full definition of Pointee. (Its destructor cannot be instantiated.)
You need to log in
before you can comment on or make changes to this bug.
Description
•