mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 538586: Notify clients of channel errors if they call Close() before deleting themselves, but before the error notification event is delivered from the IO thread. r=bent
This commit is contained in:
parent
4773f70f01
commit
c63eb826e4
@ -130,8 +130,17 @@ AsyncChannel::Close()
|
||||
{
|
||||
MutexAutoLock lock(mMutex);
|
||||
|
||||
if (ChannelError == mChannelState)
|
||||
if (ChannelError == mChannelState) {
|
||||
// See bug 538586: if the listener gets deleted while the
|
||||
// IO thread's NotifyChannelError event is still enqueued
|
||||
// and subsequently deletes us, then the error event will
|
||||
// also be deleted and the listener will never be notified
|
||||
// of the channel error.
|
||||
if (mListener) {
|
||||
NotifyMaybeChannelError();
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
if (ChannelConnected != mChannelState)
|
||||
// XXX be strict about this until there's a compelling reason
|
||||
|
Loading…
Reference in New Issue
Block a user