Improve ThreadSafeWeakPtrHashKey behaviour during an object's destructor
Categories
(Core :: XPCOM, enhancement)
Tracking
()
People
(Reporter: nika, Assigned: nika)
References
Details
Attachments
(2 external files)
Currently ThreadSafeWeakPtrHashKey is defined fully in terms of the concrete referenced type, meaning that it cannot work late during an object's lifecycle, after the object's refcount has reached 0 and during the destructor. I expect that removing entries from a table during the destructor is a clear use-case for this type, meaning that it would be better if we supported this.
This patch does this by simplifying the handling of ThreadSafeWeakPtr such that it's used directly, and slightly improving the ergonomics of the underlying type so that it can be used directly in this way.
| Assignee | ||
Comment 1•23 days ago
|
||
Currently ThreadSafeWeakPtrHashKey is defined fully in terms of the
concrete referenced type, meaning that it cannot work late during an
object's lifecycle, after the object's refcount has reached 0 and during
the destructor. I expect that removing entries from a table during the
destructor is a clear use-case for this type, meaning that it would be
better if we supported this.
This patch does this by simplifying the handling of ThreadSafeWeakPtr
such that it's used directly, and slightly improving the ergonomics of
the underlying type so that it can be used directly in this way.
Comment 4•23 days ago
|
||
Backed out for causing android build bustages
Backout link: https://hg.mozilla.org/integration/autoland/rev/3f1f2902caa3bd66cbf1ead79899a0af5ac9dcfc
| Assignee | ||
Updated•22 days ago
|
Comment 6•21 days ago
|
||
| bugherder | ||
| Assignee | ||
Comment 8•10 days ago
|
||
Currently ThreadSafeWeakPtrHashKey is defined fully in terms of the
concrete referenced type, meaning that it cannot work late during an
object's lifecycle, after the object's refcount has reached 0 and during
the destructor. I expect that removing entries from a table during the
destructor is a clear use-case for this type, meaning that it would be
better if we supported this.
This patch does this by simplifying the handling of ThreadSafeWeakPtr
such that it's used directly, and slightly improving the ergonomics of
the underlying type so that it can be used directly in this way.
Original Revision: https://phabricator.services.mozilla.com/D331272
Updated•10 days ago
|
Updated•9 days ago
|
Updated•6 days ago
|
Updated•6 days ago
|
Comment 10•6 days ago
|
||
| uplift | ||
Description
•