move the mtransport WrapRunnable infrastructure into XPCOM, generalizing NS_RunnableMethod{,WithArg}

NEW
Unassigned

Status

()

Core
XPCOM
3 years ago
3 months ago

People

(Reporter: froydnj, Unassigned)

Tracking

Firefox Tracking Flags

(Not tracked)

Details

People keep using WrapRunnable in all sorts of places, or re-inventing NS_NewRunnableMethod*; we should just extend NS_NewRunnableMethod appropriately.  This might also help get rid of some of the post-to-chromium-message-loop bits that people keep writing.

I have a refactoring of WrapRunnable lying around; I need to go through it again and make sure that all the C++ template magic is sufficiently magical.

Comment 1

3 years ago
I very much want the template instantiation to be explicit, not implicit. See bug 622728 comment 5 and comment 21-24. Implicit potentially non-owning types are a footgun.
You need to log in before you can comment on or make changes to this bug.