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