зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1120485. Add logging to check if we're closing MessageChannel::mHandle twice. r=milan
This commit is contained in:
Родитель
049c40b0ef
Коммит
c30cae967e
|
@ -521,13 +521,20 @@ MessageChannel::~MessageChannel()
|
|||
MOZ_COUNT_DTOR(ipc::MessageChannel);
|
||||
IPC_ASSERT(mCxxStackFrames.empty(), "mismatched CxxStackFrame ctor/dtors");
|
||||
#ifdef OS_WIN
|
||||
BOOL ok = CloseHandle(mEvent);
|
||||
if (!ok) {
|
||||
if (mEvent) {
|
||||
BOOL ok = CloseHandle(mEvent);
|
||||
mEvent = nullptr;
|
||||
|
||||
if (!ok) {
|
||||
gfxDevCrash(mozilla::gfx::LogReason::MessageChannelCloseFailure) <<
|
||||
"MessageChannel failed to close. GetLastError: " <<
|
||||
GetLastError();
|
||||
}
|
||||
MOZ_RELEASE_ASSERT(ok);
|
||||
} else {
|
||||
gfxDevCrash(mozilla::gfx::LogReason::MessageChannelCloseFailure) <<
|
||||
"MessageChannel failed to close. GetLastError: " <<
|
||||
GetLastError();
|
||||
"MessageChannel destructor ran without an mEvent Handle";
|
||||
}
|
||||
MOZ_RELEASE_ASSERT(ok);
|
||||
#endif
|
||||
Clear();
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче