Bug 1431803 Disable some __try blocks that are unneeded in our use case draft
authorTom Ritter <tom@mozilla.com>
Fri, 19 Jan 2018 13:26:22 -0600
changeset 723587 fe35575863257f8ae364d9787e22c0a5c4ac9c5b
parent 723473 e2bb11b88bd45bdb2e055042e1624b74d414e73c
child 723588 4b83e3b4ab033e0f2b975ca039df4571881de4c2
push id96476
push userbmo:tom@mozilla.com
push dateTue, 23 Jan 2018 15:37:18 +0000
bugs1431803
milestone60.0a1
Bug 1431803 Disable some __try blocks that are unneeded in our use case MozReview-Commit-ID: JRKY4wp7sdu
security/sandbox/chromium/base/threading/platform_thread_win.cc
old mode 100644
new mode 100755
--- a/security/sandbox/chromium/base/threading/platform_thread_win.cc
+++ b/security/sandbox/chromium/base/threading/platform_thread_win.cc
@@ -32,27 +32,30 @@ typedef struct tagTHREADNAME_INFO {
 } THREADNAME_INFO;
 
 // The SetThreadDescription API was brought in version 1607 of Windows 10.
 typedef HRESULT(WINAPI* SetThreadDescription)(HANDLE hThread,
                                               PCWSTR lpThreadDescription);
 
 // This function has try handling, so it is separated out of its caller.
 void SetNameInternal(PlatformThreadId thread_id, const char* name) {
+  //This function is only used for debugging purposes, as you can find by its caller
+#ifndef __MINGW32__
   THREADNAME_INFO info;
   info.dwType = 0x1000;
   info.szName = name;
   info.dwThreadID = thread_id;
   info.dwFlags = 0;
 
   __try {
     RaiseException(kVCThreadNameException, 0, sizeof(info)/sizeof(DWORD),
                    reinterpret_cast<DWORD_PTR*>(&info));
   } __except(EXCEPTION_CONTINUE_EXECUTION) {
   }
+#endif
 }
 
 struct ThreadParams {
   PlatformThread::Delegate* delegate;
   bool joinable;
   ThreadPriority priority;
 };