summaryrefslogtreecommitdiffstats
path: root/chrome/renderer
diff options
context:
space:
mode:
authoravi@google.com <avi@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2009-06-19 15:51:43 +0000
committeravi@google.com <avi@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2009-06-19 15:51:43 +0000
commitb0fd9c1c6b3ccf0b436d38d181ab26100b3135a6 (patch)
tree3ee9e2272dd451e0ec0198e62184a34569de3d58 /chrome/renderer
parentf20c241f0d0e7e945c6de9117b3c9bb3ed1aee3e (diff)
downloadchromium_src-b0fd9c1c6b3ccf0b436d38d181ab26100b3135a6.zip
chromium_src-b0fd9c1c6b3ccf0b436d38d181ab26100b3135a6.tar.gz
chromium_src-b0fd9c1c6b3ccf0b436d38d181ab26100b3135a6.tar.bz2
Changing the mode we pull events in, so we don't fire off timers and notifications.
BUG=http://crbug.com/14609 TEST=No immediate test; see that the specified crash in the bug report stops happening. Review URL: http://codereview.chromium.org/132070 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@18814 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/renderer')
-rw-r--r--chrome/renderer/renderer_main_platform_delegate_mac.mm8
1 files changed, 5 insertions, 3 deletions
diff --git a/chrome/renderer/renderer_main_platform_delegate_mac.mm b/chrome/renderer/renderer_main_platform_delegate_mac.mm
index 2c849da..9e86044d 100644
--- a/chrome/renderer/renderer_main_platform_delegate_mac.mm
+++ b/chrome/renderer/renderer_main_platform_delegate_mac.mm
@@ -83,15 +83,17 @@ namespace {
// not process them (or at least remove them from the queue), the windowserver
// will mark us as "not responding" and will start doing bad things like run
// spindump on us (see <http://crbug.com/11319>). This function just keeps the
-// event queue empty. TODO(avi):Once Cocoa is gone from the renderer, remove
-// this code <http://crbug.com/13893>.
+// event queue empty. It uses a custom run loop mode so that no timers or
+// notifications fire and surprise Cocoa that's running in another thread.
+// TODO(avi):Once Cocoa is gone from the renderer, remove this code
+// <http://crbug.com/13893>.
void PullAccumulatedWindowserverEvents() {
base::ScopedNSAutoreleasePool scoped_pool;
while ([[NSApplication sharedApplication]
nextEventMatchingMask:NSAnyEventMask
untilDate:nil
- inMode:NSDefaultRunLoopMode
+ inMode:@"org.chromium.CustomRunLoopModeSoThatNothingFires"
dequeue:YES]) {
// just drop all pending events on the floor
}