When a nested run loop is driven directly by Run/DoRun as opposed to being a
nested native loop run by code outside of our control, and the nested run loop
stops, don't schedule nesting-deferred work until returning fron Run/DoRun.
BUG=24337, 24383
TEST=With r28745 backed out or an equivalent change recommitted:
1. Test case from bug 24337: the window should close
2. Test case from bug 24383: no Chromium processes should use 100% CPU
Review URL: http://codereview.chromium.org/264042
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@28811 0039d316-1c4b-4281-b951-d872f2087c98
diff --git a/base/message_pump_mac.h b/base/message_pump_mac.h
index f7e9a83a..34390c0 100644
--- a/base/message_pump_mac.h
+++ b/base/message_pump_mac.h
@@ -62,6 +62,10 @@
// the object was created in.
int nesting_level_;
+ // The recursion depth (calculated in the same way as nesting_level_) of the
+ // innermost executing CFRunLoopRun loop started by a call to Run.
+ int run_nesting_level_;
+
private:
// Timer callback scheduled by ScheduleDelayedWork. This does not do any
// work, but it signals delayed_work_source_ so that delayed work can be
@@ -150,10 +154,6 @@
private:
virtual void EnterExitRunLoop(CFRunLoopActivity activity);
- // The recursion depth (calculated in the same way as nesting_level_) of the
- // innermost executing CFRunLoopRun loop started by a call to Run.
- int innermost_quittable_;
-
// True if Quit is called to stop the innermost MessagePump
// (innermost_quittable_) but some other CFRunLoopRun loop (nesting_level_)
// is running inside the MessagePump's innermost Run call.