mirror of
https://github.com/roytam1/palemoon27.git
synced 2026-06-08 17:39:19 +00:00
Implement the ability to get the currently running task queue
This will be useful for asserting things.
This commit is contained in:
@@ -6,6 +6,7 @@
|
||||
|
||||
#include "AbstractThread.h"
|
||||
|
||||
#include "MediaTaskQueue.h"
|
||||
#include "nsThreadUtils.h"
|
||||
|
||||
#include "mozilla/ClearOnShutdown.h"
|
||||
@@ -27,7 +28,9 @@ template<>
|
||||
bool
|
||||
AbstractThreadImpl<nsIThread>::IsCurrentThreadIn()
|
||||
{
|
||||
return NS_GetCurrentThread() == mTarget;
|
||||
bool in = NS_GetCurrentThread() == mTarget;
|
||||
MOZ_ASSERT_IF(in, MediaTaskQueue::GetCurrentQueue() == nullptr);
|
||||
return in;
|
||||
}
|
||||
|
||||
AbstractThread*
|
||||
|
||||
Reference in New Issue
Block a user