Fix ASSERT in WindowsDebugLogger again
If debugger was already attached, closing the exit handle would incorrectly assert. Bug: None Change-Id: I322591c66a9885a260a87750e066ba2e9d07fe23 Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/28321 Commit-Queue: Austin Eng <enga@chromium.org> Reviewed-by: Corentin Wallez <cwallez@chromium.org> Reviewed-by: Austin Eng <enga@chromium.org>
This commit is contained in:
parent
498d5ea20a
commit
9427c97d9c
|
@ -82,6 +82,12 @@ namespace utils {
|
||||||
}
|
}
|
||||||
|
|
||||||
~WindowsDebugLogger() override {
|
~WindowsDebugLogger() override {
|
||||||
|
if (IsDebuggerPresent()) {
|
||||||
|
// This condition is true when running inside Visual Studio or some other debugger.
|
||||||
|
// Messages are already printed there so we don't need to do anything.
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if (mShouldExitHandle != nullptr) {
|
if (mShouldExitHandle != nullptr) {
|
||||||
ASSERT(SetEvent(mShouldExitHandle) != 0);
|
ASSERT(SetEvent(mShouldExitHandle) != 0);
|
||||||
CloseHandle(mShouldExitHandle);
|
CloseHandle(mShouldExitHandle);
|
||||||
|
|
Loading…
Reference in New Issue