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

branch
TOR_BUG_3246
changeset 7
129ffea94266
equal deleted inserted replaced
-1:000000000000 0:cea5b908a88e
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
8
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
13
14 use_minidump_write_mutex_ = true;
15 last_minidump_write_result_ = false;
16
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 + }
31
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 }
36
37 use_minidump_write_mutex_ = false;
38 UpdateNextID();

mercurial