Scope LogMessage debug mutex lock to avoid deadlock on ANGLE_CRASH In the LogMessage destructor, in debug builds, the g_debugMutex gets locked; however, if ANGLE_CRASH() is called at the bottom of the function, and SEH (via /EHsc) is used (such as in googletest), then the lock destructor will not get called, and the mutex will not be released. If another LogMessage is created subsequently, the process will hang on attempting to lock the mutex again. This is exactly what happened when this Dawn unit test failed, and would hang for about 2 hours until the runner timed out: http://go/bbid/8801856579635182833 This CL scopes the lock to not include the ANGLE_CRASH() call (and the break into debugger). Bug: angleproject:7715 Change-Id: Ib31ad9c0641a521e28f1179c079ba1555c3274e2 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3928211 Commit-Queue: Antonio Maiorano <amaiorano@google.com> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>