From f6181d03657465ff0a6fa61bddde841fa77c7cd6 Mon Sep 17 00:00:00 2001 From: Austin Eng Date: Thu, 17 Nov 2022 20:54:14 +0000 Subject: [PATCH] Change UNREACHABLE to ASSERT(false) in OnDebugUtilsCallback In cases that a debug message does happen, we shouldn't use unreachable as it will make the compiler use a false assumption. Instead, only ASSERT(false) which crashes in debug, and does nothing in release builds. Bug: chromium:1375131 Change-Id: I7733151c241ee875ac40969ce22f037351141e89 Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/110600 Auto-Submit: Austin Eng Kokoro: Kokoro Reviewed-by: Kai Ninomiya Commit-Queue: Austin Eng --- src/dawn/native/vulkan/BackendVk.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/dawn/native/vulkan/BackendVk.cpp b/src/dawn/native/vulkan/BackendVk.cpp index 870824f746..e2ef5c6936 100644 --- a/src/dawn/native/vulkan/BackendVk.cpp +++ b/src/dawn/native/vulkan/BackendVk.cpp @@ -157,7 +157,7 @@ OnDebugUtilsCallback(VkDebugUtilsMessageSeverityFlagBitsEXT messageSeverity, // We get to this line if no device was associated with the message. Crash so that the failure // is loud and makes tests fail in Debug. dawn::ErrorLog() << pCallbackData->pMessage; - UNREACHABLE(); + ASSERT(false); return VK_FALSE; }