mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 942118 - Ensure that we call MessageChannel::ReportConnectionError() with no lock. r=bent
Making a call to mListener with a mMonitor lock is bad. Most of the code path for ReportConnectionError() are doing this because they are just after the Connected() method which needs the lock. We ensure to unlock mMonitor in the scope of the ReportConnectionError() call.
This commit is contained in:
parent
fd1ab57ebe
commit
219a43e8f8
@ -1285,6 +1285,9 @@ MessageChannel::ReportMessageRouteError(const char* channelName) const
|
||||
void
|
||||
MessageChannel::ReportConnectionError(const char* aChannelName) const
|
||||
{
|
||||
AssertWorkerThread();
|
||||
mMonitor->AssertCurrentThreadOwns();
|
||||
|
||||
const char* errorMsg = nullptr;
|
||||
switch (mChannelState) {
|
||||
case ChannelClosed:
|
||||
@ -1308,6 +1311,8 @@ MessageChannel::ReportConnectionError(const char* aChannelName) const
|
||||
}
|
||||
|
||||
PrintErrorMessage(mSide, aChannelName, errorMsg);
|
||||
|
||||
MonitorAutoUnlock unlock(*mMonitor);
|
||||
mListener->OnProcessingError(MsgDropped);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user