Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1174)

Unified Diff: base/message_loop/message_pump_mac.mm

Issue 1641513004: Update //base to chromium 9659b08ea5a34f889dc4166217f438095ddc10d2 (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 4 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « base/message_loop/message_loop_unittest.cc ('k') | base/metrics/field_trial_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/message_loop/message_pump_mac.mm
diff --git a/base/message_loop/message_pump_mac.mm b/base/message_loop/message_pump_mac.mm
index 914977b13d59355e1dd566a6453ea4ae4eb69c78..53e3363da572c40c1e562bbb72ddbaa49fce9489 100644
--- a/base/message_loop/message_pump_mac.mm
+++ b/base/message_loop/message_pump_mac.mm
@@ -10,6 +10,7 @@
#include <limits>
#include "base/logging.h"
+#include "base/mac/call_with_eh_frame.h"
#include "base/mac/scoped_cftyperef.h"
#include "base/message_loop/timer_slack.h"
#include "base/run_loop.h"
@@ -300,7 +301,9 @@ void MessagePumpCFRunLoopBase::RunDelayedWorkTimer(CFRunLoopTimerRef timer,
// static
void MessagePumpCFRunLoopBase::RunWorkSource(void* info) {
MessagePumpCFRunLoopBase* self = static_cast<MessagePumpCFRunLoopBase*>(info);
- self->RunWork();
+ base::mac::CallWithEHFrame(^{
+ self->RunWork();
+ });
}
// Called by MessagePumpCFRunLoopBase::RunWorkSource.
@@ -359,7 +362,9 @@ bool MessagePumpCFRunLoopBase::RunWork() {
// static
void MessagePumpCFRunLoopBase::RunIdleWorkSource(void* info) {
MessagePumpCFRunLoopBase* self = static_cast<MessagePumpCFRunLoopBase*>(info);
- self->RunIdleWork();
+ base::mac::CallWithEHFrame(^{
+ self->RunIdleWork();
+ });
}
// Called by MessagePumpCFRunLoopBase::RunIdleWorkSource.
@@ -393,7 +398,9 @@ bool MessagePumpCFRunLoopBase::RunIdleWork() {
// static
void MessagePumpCFRunLoopBase::RunNestingDeferredWorkSource(void* info) {
MessagePumpCFRunLoopBase* self = static_cast<MessagePumpCFRunLoopBase*>(info);
- self->RunNestingDeferredWork();
+ base::mac::CallWithEHFrame(^{
+ self->RunNestingDeferredWork();
+ });
}
// Called by MessagePumpCFRunLoopBase::RunNestingDeferredWorkSource.
@@ -440,15 +447,16 @@ void MessagePumpCFRunLoopBase::PreWaitObserver(CFRunLoopObserverRef observer,
CFRunLoopActivity activity,
void* info) {
MessagePumpCFRunLoopBase* self = static_cast<MessagePumpCFRunLoopBase*>(info);
-
- // Attempt to do some idle work before going to sleep.
- self->RunIdleWork();
-
- // The run loop is about to go to sleep. If any of the work done since it
- // started or woke up resulted in a nested run loop running,
- // nesting-deferred work may have accumulated. Schedule it for processing
- // if appropriate.
- self->MaybeScheduleNestingDeferredWork();
+ base::mac::CallWithEHFrame(^{
+ // Attempt to do some idle work before going to sleep.
+ self->RunIdleWork();
+
+ // The run loop is about to go to sleep. If any of the work done since it
+ // started or woke up resulted in a nested run loop running,
+ // nesting-deferred work may have accumulated. Schedule it for processing
+ // if appropriate.
+ self->MaybeScheduleNestingDeferredWork();
+ });
}
// Called from the run loop.
@@ -463,7 +471,9 @@ void MessagePumpCFRunLoopBase::PreSourceObserver(CFRunLoopObserverRef observer,
// level did not sleep or exit, nesting-deferred work may have accumulated
// if a nested loop ran. Schedule nesting-deferred work for processing if
// appropriate.
- self->MaybeScheduleNestingDeferredWork();
+ base::mac::CallWithEHFrame(^{
+ self->MaybeScheduleNestingDeferredWork();
+ });
}
// Called from the run loop.
@@ -498,7 +508,9 @@ void MessagePumpCFRunLoopBase::EnterExitObserver(CFRunLoopObserverRef observer,
// to sleep or exiting. It must be called before decrementing the
// value so that the value still corresponds to the level of the exiting
// loop.
- self->MaybeScheduleNestingDeferredWork();
+ base::mac::CallWithEHFrame(^{
+ self->MaybeScheduleNestingDeferredWork();
+ });
--self->nesting_level_;
break;
@@ -506,7 +518,9 @@ void MessagePumpCFRunLoopBase::EnterExitObserver(CFRunLoopObserverRef observer,
break;
}
- self->EnterExitRunLoop(activity);
+ base::mac::CallWithEHFrame(^{
+ self->EnterExitRunLoop(activity);
+ });
}
// Called by MessagePumpCFRunLoopBase::EnterExitRunLoop. The default
« no previous file with comments | « base/message_loop/message_loop_unittest.cc ('k') | base/metrics/field_trial_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698