diff options
author | mark@chromium.org <mark@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-10-31 15:35:26 +0000 |
---|---|---|
committer | mark@chromium.org <mark@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-10-31 15:35:26 +0000 |
commit | 070131d12c5e5a9c29baa1d8ee28d5271a088a18 (patch) | |
tree | ccb34df6997427a41a6f8679ab3003bb28d7ae61 /base/message_pump_mac.h | |
parent | 9eb8f98b6f7582ce25ba8cac11827edb8a08a5eb (diff) | |
download | chromium_src-070131d12c5e5a9c29baa1d8ee28d5271a088a18.zip chromium_src-070131d12c5e5a9c29baa1d8ee28d5271a088a18.tar.gz chromium_src-070131d12c5e5a9c29baa1d8ee28d5271a088a18.tar.bz2 |
DeferredAutoreleasePool didn't work on Snow Leopard.
This is a backout of r30647, but also resurrects the change from
http://codereview.chromium.org/341022 to work around the crash that r30647
solved much more elegantly.
We can't really leave things broken on 10.6, though. I killed most of a
perfectly good Friday evening trying to figure out how to salvage r30647,
but the DeferredAutoreleasePool approach seems doomed without making private
calls.
This makes me really sad.
BUG=25857, 26399, 26402
TEST=Does it launch on Snow Leopard now? Does it crash when you close windows?
Review URL: http://codereview.chromium.org/339095
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@30668 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'base/message_pump_mac.h')
-rw-r--r-- | base/message_pump_mac.h | 39 |
1 files changed, 1 insertions, 38 deletions
diff --git a/base/message_pump_mac.h b/base/message_pump_mac.h index d7f723b..3d06c17 100644 --- a/base/message_pump_mac.h +++ b/base/message_pump_mac.h @@ -1,4 +1,4 @@ -// Copyright (c) 2009 The Chromium Authors. All rights reserved. +// Copyright (c) 2008 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. @@ -35,13 +35,6 @@ #include <CoreFoundation/CoreFoundation.h> #include <IOKit/IOKitLib.h> -#if defined(__OBJC__) -@class NSAutoreleasePool; -#else // __OBJC__ -class NSAutoreleasePool; -#endif // __OBJC__ - - namespace base { class Time; @@ -67,10 +60,6 @@ class MessagePumpCFRunLoopBase : public MessagePump { int nesting_level() const { return nesting_level_; } int run_nesting_level() const { return run_nesting_level_; } - // Factory method for creating an autorelease pool. Not all message - // pumps work with autorelease pools in the same way. - virtual NSAutoreleasePool* CreateAutoreleasePool(); - private: // Timer callback scheduled by ScheduleDelayedWork. This does not do any // work, but it signals delayed_work_source_ so that delayed work can be @@ -234,35 +223,13 @@ class MessagePumpNSRunLoop : public MessagePumpCFRunLoopBase { }; class MessagePumpNSApplication : public MessagePumpCFRunLoopBase { - // ObjC objects and C++ objects can't be friends, so this function - // will act as a friendly trampoline for - // MessagePumpNSAppDeferredAutoReleasePool to call - // set_needs_event_loop_wakeup. - friend void SetNeedsEventLoopWakeUpTrue(MessagePumpNSApplication* pump); - public: MessagePumpNSApplication(); virtual void DoRun(Delegate* delegate); virtual void Quit(); - protected: - // MessagePumpNSApplications need a special autorelease pool that works - // correctly when nested inside another autorelease pool. - virtual NSAutoreleasePool* CreateAutoreleasePool(); - - // Sets a flag that will trigger the sending of an NSEvent to wake up the - // NSApplication event loop when the run loop exits. - void set_needs_event_loop_wake_up_true() { - needs_event_loop_wake_up_ = true; - } - private: - virtual void EnterExitRunLoop(CFRunLoopActivity activity); - - // Send a null event through to the event loop if necessary. - void WakeUpEventLoop(); - // False after Quit is called. bool keep_running_; @@ -272,10 +239,6 @@ class MessagePumpNSApplication : public MessagePumpCFRunLoopBase { // in DoRun. bool running_own_loop_; - // True if an event should be sent to the event loop to cause it to spin - // when the run loop is exiting. - bool needs_event_loop_wake_up_; - DISALLOW_COPY_AND_ASSIGN(MessagePumpNSApplication); }; |