toolkit/crashreporter/breakpad-patches/13-bug836829.patch

changeset 0
6474c204b198
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/toolkit/crashreporter/breakpad-patches/13-bug836829.patch	Wed Dec 31 06:09:35 2014 +0100
     1.3 @@ -0,0 +1,38 @@
     1.4 +# HG changeset patch
     1.5 +# User Georg Fritzsche <georg.fritzsche@googlemail.com>
     1.6 +# Date 1366630152 -7200
     1.7 +#      Mon Apr 22 13:29:12 2013 +0200
     1.8 +# Node ID 11f7a9321b7d5d85eddc2db16e58e6870a7c4e06
     1.9 +# Parent  e74de3db7dd27ffda8f4772f892cfb52c5c35649
    1.10 +Bug 836829 - Fix missing result check in Mac exception handler. r=ted
    1.11 +
    1.12 +diff --git a/src/client/mac/handler/exception_handler.cc b/src/client/mac/handler/exception_handler.cc
    1.13 +--- a/src/client/mac/handler/exception_handler.cc
    1.14 ++++ b/src/client/mac/handler/exception_handler.cc
    1.15 +@@ -276,19 +276,23 @@ bool ExceptionHandler::WriteMinidump(boo
    1.16 + 
    1.17 +   use_minidump_write_mutex_ = true;
    1.18 +   last_minidump_write_result_ = false;
    1.19 + 
    1.20 +   // Lock the mutex.  Since we just created it, this will return immediately.
    1.21 +   if (pthread_mutex_lock(&minidump_write_mutex_) == 0) {
    1.22 +     // Send an empty message to the handle port so that a minidump will
    1.23 +     // be written
    1.24 +-    SendMessageToHandlerThread(write_exception_stream ?
    1.25 +-                                   kWriteDumpWithExceptionMessage :
    1.26 +-                                   kWriteDumpMessage);
    1.27 ++    bool result = SendMessageToHandlerThread(write_exception_stream ?
    1.28 ++                                             kWriteDumpWithExceptionMessage :
    1.29 ++                                             kWriteDumpMessage);
    1.30 ++    if (!result) {
    1.31 ++      pthread_mutex_unlock(&minidump_write_mutex_);
    1.32 ++      return false;
    1.33 ++    }
    1.34 + 
    1.35 +     // Wait for the minidump writer to complete its writing.  It will unlock
    1.36 +     // the mutex when completed
    1.37 +     pthread_mutex_lock(&minidump_write_mutex_);
    1.38 +   }
    1.39 + 
    1.40 +   use_minidump_write_mutex_ = false;
    1.41 +   UpdateNextID();

mercurial