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

Sat, 03 Jan 2015 20:18:00 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Sat, 03 Jan 2015 20:18:00 +0100
branch
TOR_BUG_3246
changeset 7
129ffea94266
permissions
-rw-r--r--

Conditionally enable double key logic according to:
private browsing mode or privacy.thirdparty.isolate preference and
implement in GetCookieStringCommon and FindCookie where it counts...
With some reservations of how to convince FindCookie users to test
condition and pass a nullptr when disabling double key logic.

     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