mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1028383 - Make ITopLevelProtocol assert to enforce its assumptions that things happen on the main thread - r=bent
This commit is contained in:
parent
b610e8849f
commit
5192c5f558
@ -19,11 +19,14 @@ namespace ipc {
|
|||||||
|
|
||||||
IToplevelProtocol::~IToplevelProtocol()
|
IToplevelProtocol::~IToplevelProtocol()
|
||||||
{
|
{
|
||||||
|
MOZ_ASSERT(NS_IsMainThread());
|
||||||
mOpenActors.clear();
|
mOpenActors.clear();
|
||||||
}
|
}
|
||||||
|
|
||||||
void IToplevelProtocol::AddOpenedActor(IToplevelProtocol* aActor)
|
void IToplevelProtocol::AddOpenedActor(IToplevelProtocol* aActor)
|
||||||
{
|
{
|
||||||
|
MOZ_ASSERT(NS_IsMainThread());
|
||||||
|
|
||||||
#ifdef DEBUG
|
#ifdef DEBUG
|
||||||
for (const IToplevelProtocol* actor = mOpenActors.getFirst();
|
for (const IToplevelProtocol* actor = mOpenActors.getFirst();
|
||||||
actor;
|
actor;
|
||||||
|
@ -21,6 +21,7 @@
|
|||||||
#include "mozilla/ipc/Transport.h"
|
#include "mozilla/ipc/Transport.h"
|
||||||
#include "mozilla/ipc/MessageLink.h"
|
#include "mozilla/ipc/MessageLink.h"
|
||||||
#include "mozilla/LinkedList.h"
|
#include "mozilla/LinkedList.h"
|
||||||
|
#include "MainThreadUtils.h"
|
||||||
|
|
||||||
#if defined(ANDROID) && defined(DEBUG)
|
#if defined(ANDROID) && defined(DEBUG)
|
||||||
#include <android/log.h>
|
#include <android/log.h>
|
||||||
@ -187,6 +188,7 @@ protected:
|
|||||||
: mProtocolId(aProtoId)
|
: mProtocolId(aProtoId)
|
||||||
, mTrans(nullptr)
|
, mTrans(nullptr)
|
||||||
{
|
{
|
||||||
|
MOZ_ASSERT(NS_IsMainThread());
|
||||||
}
|
}
|
||||||
|
|
||||||
~IToplevelProtocol();
|
~IToplevelProtocol();
|
||||||
@ -212,10 +214,12 @@ public:
|
|||||||
*/
|
*/
|
||||||
IToplevelProtocol* GetFirstOpenedActors()
|
IToplevelProtocol* GetFirstOpenedActors()
|
||||||
{
|
{
|
||||||
|
MOZ_ASSERT(NS_IsMainThread());
|
||||||
return mOpenActors.getFirst();
|
return mOpenActors.getFirst();
|
||||||
}
|
}
|
||||||
const IToplevelProtocol* GetFirstOpenedActors() const
|
const IToplevelProtocol* GetFirstOpenedActors() const
|
||||||
{
|
{
|
||||||
|
MOZ_ASSERT(NS_IsMainThread());
|
||||||
return mOpenActors.getFirst();
|
return mOpenActors.getFirst();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user