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

Wed, 31 Dec 2014 06:09:35 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Wed, 31 Dec 2014 06:09:35 +0100
changeset 0
6474c204b198
permissions
-rw-r--r--

Cloned upstream origin tor-browser at tor-browser-31.3.0esr-4.5-1-build1
revision ID fc1c9ff7c1b2defdbc039f12214767608f46423f for hacking purpose.

     1 # HG changeset patch
     2 # User Georg Fritzsche <georg.fritzsche@googlemail.com>
     3 # Date 1366630152 -7200
     4 #      Mon Apr 22 13:29:12 2013 +0200
     5 # Node ID 11f7a9321b7d5d85eddc2db16e58e6870a7c4e06
     6 # Parent  e74de3db7dd27ffda8f4772f892cfb52c5c35649
     7 Bug 836829 - Fix missing result check in Mac exception handler. r=ted
     9 diff --git a/src/client/mac/handler/exception_handler.cc b/src/client/mac/handler/exception_handler.cc
    10 --- a/src/client/mac/handler/exception_handler.cc
    11 +++ b/src/client/mac/handler/exception_handler.cc
    12 @@ -276,19 +276,23 @@ bool ExceptionHandler::WriteMinidump(boo
    14    use_minidump_write_mutex_ = true;
    15    last_minidump_write_result_ = false;
    17    // Lock the mutex.  Since we just created it, this will return immediately.
    18    if (pthread_mutex_lock(&minidump_write_mutex_) == 0) {
    19      // Send an empty message to the handle port so that a minidump will
    20      // be written
    21 -    SendMessageToHandlerThread(write_exception_stream ?
    22 -                                   kWriteDumpWithExceptionMessage :
    23 -                                   kWriteDumpMessage);
    24 +    bool result = SendMessageToHandlerThread(write_exception_stream ?
    25 +                                             kWriteDumpWithExceptionMessage :
    26 +                                             kWriteDumpMessage);
    27 +    if (!result) {
    28 +      pthread_mutex_unlock(&minidump_write_mutex_);
    29 +      return false;
    30 +    }
    32      // Wait for the minidump writer to complete its writing.  It will unlock
    33      // the mutex when completed
    34      pthread_mutex_lock(&minidump_write_mutex_);
    35    }
    37    use_minidump_write_mutex_ = false;
    38    UpdateNextID();

mercurial