Bug 1486562 - Record reference count changes for SourceListener, r=jib.

--HG--
extra : rebase_source : efd7935de09e85e15d6bd77fd65a49c42be7ff6f
This commit is contained in:
Brian Hackett 2018-08-31 05:24:09 -10:00
Родитель 8b21da2df9
Коммит 44f3ddf9d7
2 изменённых файлов: 8 добавлений и 3 удалений

Просмотреть файл

@ -342,7 +342,8 @@ public:
typedef MozPromise<bool /* aIgnored */, RefPtr<MediaMgrError>, true> InitPromise;
MOZ_DECLARE_WEAKREFERENCE_TYPENAME(SourceListener)
NS_INLINE_DECL_THREADSAFE_REFCOUNTING_WITH_MAIN_THREAD_DESTRUCTION(SourceListener)
NS_INLINE_DECL_THREADSAFE_REFCOUNTING_WITH_MAIN_THREAD_DESTRUCTION_AND_RECORDING(SourceListener,
recordreplay::Behavior::Preserve)
SourceListener();

Просмотреть файл

@ -59,7 +59,7 @@ struct DeleteOnMainThreadTask : public Runnable
} // namespace layers
} // namespace mozilla
#define NS_INLINE_DECL_THREADSAFE_REFCOUNTING_WITH_MAIN_THREAD_DESTRUCTION(_class) \
#define NS_INLINE_DECL_THREADSAFE_REFCOUNTING_WITH_MAIN_THREAD_DESTRUCTION_AND_RECORDING(_class, _recording) \
public: \
NS_METHOD_(MozExternalRefCountType) AddRef(void) { \
MOZ_ASSERT_TYPE_OK_FOR_REFCOUNTING(_class) \
@ -89,9 +89,13 @@ public: \
return count; \
} \
protected: \
::mozilla::ThreadSafeAutoRefCnt mRefCnt; \
::mozilla::ThreadSafeAutoRefCntWithRecording<_recording> mRefCnt; \
private: \
::mozilla::layers::HelperForMainThreadDestruction mHelperForMainThreadDestruction; \
public:
#define NS_INLINE_DECL_THREADSAFE_REFCOUNTING_WITH_MAIN_THREAD_DESTRUCTION(_class) \
NS_INLINE_DECL_THREADSAFE_REFCOUNTING_WITH_MAIN_THREAD_DESTRUCTION_AND_RECORDING \
(_class, recordreplay::Behavior::DontPreserve)
#endif