Closed
Bug 1003061
Opened 11 years ago
Closed 6 years ago
Specialize NS_RunnableMethod to release nsMainThreadPtrHandle values on the main thread.
Categories
(Core :: XPCOM, defect)
Core
XPCOM
Tracking
()
RESOLVED
WORKSFORME
People
(Reporter: Yoric, Unassigned)
Details
At the moment, the NS_RunnableMethod family produces a Runnable that releases its reference to the object upon destruction. However, there is no guarantee when the Runnable is destroyed and on which thread. Therefore, this is not compatible with nsMainThreadPtrHandle.
We should provide a specialization of the NS_RunnableMethod family that makes sure we release nsMainThreadPtrHandle on the main thread. Note that the main thread may be either the calling thread or the dispatch target.
Comment 1•6 years ago
|
||
I don't think this a problem; nsMainThreadPtrHandle holds an nsMainThreadPtrHolder, which in turn ensures whatever it's holding on to is released on the main thread whenever nsMainThreadPtrHolder is destroyed. Please correct me if I'm misunderstanding the problem here.
Status: NEW → RESOLVED
Closed: 6 years ago
Resolution: --- → WORKSFORME
You need to log in
before you can comment on or make changes to this bug.
Description
•