toolkit/crashreporter/breakpad-patches/13-bug836829.patch
author Dan Minor <dminor@mozilla.com>
Thu, 10 Apr 2014 15:24:29 -0400
changeset 178551 b62c590540b0a0b82924413a0f2bcf0022cc8713
parent 140702 f5ddc199b1a67f14aaeab345f74d7fb80d21c0e5
permissions -rw-r--r--
Bug 994830 - Make cppunittest test timeout less than mozharness process timeout; r=ted

# HG changeset patch
# User Georg Fritzsche <georg.fritzsche@googlemail.com>
# Date 1366630152 -7200
#      Mon Apr 22 13:29:12 2013 +0200
# Node ID 11f7a9321b7d5d85eddc2db16e58e6870a7c4e06
# Parent  e74de3db7dd27ffda8f4772f892cfb52c5c35649
Bug 836829 - Fix missing result check in Mac exception handler. r=ted

diff --git a/src/client/mac/handler/exception_handler.cc b/src/client/mac/handler/exception_handler.cc
--- a/src/client/mac/handler/exception_handler.cc
+++ b/src/client/mac/handler/exception_handler.cc
@@ -276,19 +276,23 @@ bool ExceptionHandler::WriteMinidump(boo
 
   use_minidump_write_mutex_ = true;
   last_minidump_write_result_ = false;
 
   // Lock the mutex.  Since we just created it, this will return immediately.
   if (pthread_mutex_lock(&minidump_write_mutex_) == 0) {
     // Send an empty message to the handle port so that a minidump will
     // be written
-    SendMessageToHandlerThread(write_exception_stream ?
-                                   kWriteDumpWithExceptionMessage :
-                                   kWriteDumpMessage);
+    bool result = SendMessageToHandlerThread(write_exception_stream ?
+                                             kWriteDumpWithExceptionMessage :
+                                             kWriteDumpMessage);
+    if (!result) {
+      pthread_mutex_unlock(&minidump_write_mutex_);
+      return false;
+    }
 
     // Wait for the minidump writer to complete its writing.  It will unlock
     // the mutex when completed
     pthread_mutex_lock(&minidump_write_mutex_);
   }
 
   use_minidump_write_mutex_ = false;
   UpdateNextID();