Thu, 22 Jan 2015 13:21:57 +0100
Incorporate requested changes from Mozilla in review:
https://bugzilla.mozilla.org/show_bug.cgi?id=1123480#c6
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();