зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1649974 - P1. Make WeakPtr work with generic taskqueue. r=froydnj
It worked until now as IPC's MessageChannel was only used with background taskqueue; which use a threadpool made of a single thread only. Differential Revision: https://phabricator.services.mozilla.com/D82499
This commit is contained in:
Родитель
9a6c0a0bd5
Коммит
9194155201
|
@ -98,12 +98,12 @@
|
|||
// on a single thread. The following macros implement assertions for
|
||||
// checking these conditions.
|
||||
//
|
||||
// We re-use XPCOM's nsAutoOwningThread checks when they are available. This has
|
||||
// the advantage that it works with cooperative thread pools.
|
||||
// We re-use XPCOM's nsAutoOwningEventTarget checks when they are available.
|
||||
// This has the advantage that it works with cooperative thread pools.
|
||||
|
||||
# define MOZ_WEAKPTR_DECLARE_THREAD_SAFETY_CHECK \
|
||||
/* Will be none if mPtr = nullptr. */ \
|
||||
Maybe<nsAutoOwningThread> _owningThread;
|
||||
Maybe<nsAutoOwningEventTarget> _owningThread;
|
||||
# define MOZ_WEAKPTR_INIT_THREAD_SAFETY_CHECK() \
|
||||
do { \
|
||||
if (p) { \
|
||||
|
|
Загрузка…
Ссылка в новой задаче