mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1091962 - AutoEventEnqueuer must keep alive ChannelEventQueue, r=smaug, r=jduell
This commit is contained in:
parent
e113c26245
commit
3051ad31c3
@ -162,7 +162,7 @@ ChannelEventQueue::MaybeFlushQueue()
|
|||||||
// Ensures that ShouldEnqueue() will be true during its lifetime (letting
|
// Ensures that ShouldEnqueue() will be true during its lifetime (letting
|
||||||
// caller know incoming IPDL msgs should be queued). Flushes the queue when it
|
// caller know incoming IPDL msgs should be queued). Flushes the queue when it
|
||||||
// goes out of scope.
|
// goes out of scope.
|
||||||
class AutoEventEnqueuer
|
class MOZ_STACK_CLASS AutoEventEnqueuer
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
explicit AutoEventEnqueuer(ChannelEventQueue *queue) : mEventQueue(queue) {
|
explicit AutoEventEnqueuer(ChannelEventQueue *queue) : mEventQueue(queue) {
|
||||||
@ -172,7 +172,7 @@ class AutoEventEnqueuer
|
|||||||
mEventQueue->EndForcedQueueing();
|
mEventQueue->EndForcedQueueing();
|
||||||
}
|
}
|
||||||
private:
|
private:
|
||||||
ChannelEventQueue* mEventQueue;
|
nsRefPtr<ChannelEventQueue> mEventQueue;
|
||||||
};
|
};
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -205,7 +205,7 @@ WebSocketChannelChild::OnStart(const nsCString& aProtocol,
|
|||||||
mEncrypted = aEncrypted;
|
mEncrypted = aEncrypted;
|
||||||
|
|
||||||
if (mListener) {
|
if (mListener) {
|
||||||
AutoEventEnqueuer ensureSerialDispatch(mEventQ);;
|
AutoEventEnqueuer ensureSerialDispatch(mEventQ);
|
||||||
mListener->OnStart(mContext);
|
mListener->OnStart(mContext);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -247,7 +247,7 @@ WebSocketChannelChild::OnStop(const nsresult& aStatusCode)
|
|||||||
{
|
{
|
||||||
LOG(("WebSocketChannelChild::RecvOnStop() %p\n", this));
|
LOG(("WebSocketChannelChild::RecvOnStop() %p\n", this));
|
||||||
if (mListener) {
|
if (mListener) {
|
||||||
AutoEventEnqueuer ensureSerialDispatch(mEventQ);;
|
AutoEventEnqueuer ensureSerialDispatch(mEventQ);
|
||||||
mListener->OnStop(mContext, aStatusCode);
|
mListener->OnStop(mContext, aStatusCode);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -296,7 +296,7 @@ WebSocketChannelChild::OnMessageAvailable(const nsCString& aMsg)
|
|||||||
{
|
{
|
||||||
LOG(("WebSocketChannelChild::RecvOnMessageAvailable() %p\n", this));
|
LOG(("WebSocketChannelChild::RecvOnMessageAvailable() %p\n", this));
|
||||||
if (mListener) {
|
if (mListener) {
|
||||||
AutoEventEnqueuer ensureSerialDispatch(mEventQ);;
|
AutoEventEnqueuer ensureSerialDispatch(mEventQ);
|
||||||
mListener->OnMessageAvailable(mContext, aMsg);
|
mListener->OnMessageAvailable(mContext, aMsg);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -320,7 +320,7 @@ WebSocketChannelChild::OnBinaryMessageAvailable(const nsCString& aMsg)
|
|||||||
{
|
{
|
||||||
LOG(("WebSocketChannelChild::RecvOnBinaryMessageAvailable() %p\n", this));
|
LOG(("WebSocketChannelChild::RecvOnBinaryMessageAvailable() %p\n", this));
|
||||||
if (mListener) {
|
if (mListener) {
|
||||||
AutoEventEnqueuer ensureSerialDispatch(mEventQ);;
|
AutoEventEnqueuer ensureSerialDispatch(mEventQ);
|
||||||
mListener->OnBinaryMessageAvailable(mContext, aMsg);
|
mListener->OnBinaryMessageAvailable(mContext, aMsg);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -362,7 +362,7 @@ WebSocketChannelChild::OnAcknowledge(const uint32_t& aSize)
|
|||||||
{
|
{
|
||||||
LOG(("WebSocketChannelChild::RecvOnAcknowledge() %p\n", this));
|
LOG(("WebSocketChannelChild::RecvOnAcknowledge() %p\n", this));
|
||||||
if (mListener) {
|
if (mListener) {
|
||||||
AutoEventEnqueuer ensureSerialDispatch(mEventQ);;
|
AutoEventEnqueuer ensureSerialDispatch(mEventQ);
|
||||||
mListener->OnAcknowledge(mContext, aSize);
|
mListener->OnAcknowledge(mContext, aSize);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -410,7 +410,7 @@ WebSocketChannelChild::OnServerClose(const uint16_t& aCode,
|
|||||||
{
|
{
|
||||||
LOG(("WebSocketChannelChild::RecvOnServerClose() %p\n", this));
|
LOG(("WebSocketChannelChild::RecvOnServerClose() %p\n", this));
|
||||||
if (mListener) {
|
if (mListener) {
|
||||||
AutoEventEnqueuer ensureSerialDispatch(mEventQ);;
|
AutoEventEnqueuer ensureSerialDispatch(mEventQ);
|
||||||
mListener->OnServerClose(mContext, aCode, aReason);
|
mListener->OnServerClose(mContext, aCode, aReason);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user