diff options
author | alexeypa@chromium.org <alexeypa@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-07-22 19:52:13 +0000 |
---|---|---|
committer | alexeypa@chromium.org <alexeypa@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-07-22 19:52:13 +0000 |
commit | b908293642bab4631101157c0aac4fb89fd6c287 (patch) | |
tree | 55c8b243d5e8f1247c010c91dce694fc3af4ea78 /base/message_loop/message_pump_libevent_unittest.cc | |
parent | e7bf309bed1ed14bb5717f154cb1c3d57fef492e (diff) | |
download | chromium_src-b908293642bab4631101157c0aac4fb89fd6c287.zip chromium_src-b908293642bab4631101157c0aac4fb89fd6c287.tar.gz chromium_src-b908293642bab4631101157c0aac4fb89fd6c287.tar.bz2 |
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
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@212948 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'base/message_loop/message_pump_libevent_unittest.cc')
-rw-r--r-- | base/message_loop/message_pump_libevent_unittest.cc | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/base/message_loop/message_pump_libevent_unittest.cc b/base/message_loop/message_pump_libevent_unittest.cc index 657ac7d..52ca95b 100644 --- a/base/message_loop/message_pump_libevent_unittest.cc +++ b/base/message_loop/message_pump_libevent_unittest.cc @@ -122,7 +122,7 @@ class DeleteWatcher : public BaseWatcher { }; TEST_F(MessagePumpLibeventTest, DeleteWatcher) { - scoped_refptr<MessagePumpLibevent> pump(new MessagePumpLibevent); + scoped_ptr<MessagePumpLibevent> pump(new MessagePumpLibevent); MessagePumpLibevent::FileDescriptorWatcher* watcher = new MessagePumpLibevent::FileDescriptorWatcher; DeleteWatcher delegate(watcher); @@ -147,7 +147,7 @@ class StopWatcher : public BaseWatcher { }; TEST_F(MessagePumpLibeventTest, StopWatcher) { - scoped_refptr<MessagePumpLibevent> pump(new MessagePumpLibevent); + scoped_ptr<MessagePumpLibevent> pump(new MessagePumpLibevent); MessagePumpLibevent::FileDescriptorWatcher watcher; StopWatcher delegate(&watcher); pump->WatchFileDescriptor(pipefds_[1], |