diff options
author | alexeypa@google.com <alexeypa@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-07-22 20:06:56 +0000 |
---|---|---|
committer | alexeypa@google.com <alexeypa@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-07-22 20:06:56 +0000 |
commit | c9904b429860b83606492d4fe8f1b232c04753b5 (patch) | |
tree | 4540d02ffe16677475ae55d0b19bc2d339b961d4 /base/message_loop/message_pump.h | |
parent | 7552e6b65ac0a972036bef093ed48b5c85827f44 (diff) | |
download | chromium_src-c9904b429860b83606492d4fe8f1b232c04753b5.zip chromium_src-c9904b429860b83606492d4fe8f1b232c04753b5.tar.gz chromium_src-c9904b429860b83606492d4fe8f1b232c04753b5.tar.bz2 |
Revert 212948 "Made MessagePump a non-thread safe class."
r212948 broke Mac Builder: http://build.chromium.org/p/chromium.memory/builders/Mac%20ASAN%20Builder/builds/25623
> Made MessagePump a non-thread safe class.
>
> This CL makes MessagePump a non-thread safe class to make sure thread-bound resources (such as the UI window used for pumping messages on Windows) are freed on the correct thread.
>
> Handling of incoming tasks and synchronization between different threads was moved out to a separate class - IncomingTaskQueue reducing the number of locks to be taken while posting a task to one. Posting tasks via both MessageLoop and MessageLoopProxyImpl is now routed via IncomingTaskQueue.
>
> BUG=241939
>
> Review URL: https://chromiumcodereview.appspot.com/17567007
TBR=alexeypa@chromium.org
Review URL: https://codereview.chromium.org/19737005
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@212952 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'base/message_loop/message_pump.h')
-rw-r--r-- | base/message_loop/message_pump.h | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/base/message_loop/message_pump.h b/base/message_loop/message_pump.h index 0ebba3a..5b72232 100644 --- a/base/message_loop/message_pump.h +++ b/base/message_loop/message_pump.h @@ -6,13 +6,13 @@ #define BASE_MESSAGE_LOOP_MESSAGE_PUMP_H_ #include "base/base_export.h" -#include "base/threading/non_thread_safe.h" +#include "base/memory/ref_counted.h" namespace base { class TimeTicks; -class BASE_EXPORT MessagePump : public NonThreadSafe { +class BASE_EXPORT MessagePump : public RefCountedThreadSafe<MessagePump> { public: // Please see the comments above the Run method for an illustration of how // these delegate methods are used. @@ -42,7 +42,6 @@ class BASE_EXPORT MessagePump : public NonThreadSafe { }; MessagePump(); - virtual ~MessagePump(); // The Run method is called to enter the message pump's run loop. // @@ -119,6 +118,10 @@ class BASE_EXPORT MessagePump : public NonThreadSafe { // cancelling any pending DoDelayedWork callback. This method may only be // used on the thread that called Run. virtual void ScheduleDelayedWork(const TimeTicks& delayed_work_time) = 0; + + protected: + virtual ~MessagePump(); + friend class RefCountedThreadSafe<MessagePump>; }; } // namespace base |