diff options
author | phajdan.jr@chromium.org <phajdan.jr@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-02-01 19:52:30 +0000 |
---|---|---|
committer | phajdan.jr@chromium.org <phajdan.jr@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-02-01 19:52:30 +0000 |
commit | d8ff9e4d5064ac940e3eb4ea160d213c62478e86 (patch) | |
tree | f89c509f1dc1d9b53b3e19c5ecfea239c34f3982 /chrome/browser/automation/automation_provider_unittest.cc | |
parent | ff52c165aa2d4b98f9a11208ef8d22866aeb407b (diff) | |
download | chromium_src-d8ff9e4d5064ac940e3eb4ea160d213c62478e86.zip chromium_src-d8ff9e4d5064ac940e3eb4ea160d213c62478e86.tar.gz chromium_src-d8ff9e4d5064ac940e3eb4ea160d213c62478e86.tar.bz2 |
Make AutomationProvider RefCountedThreadSafe instead of RefCounted
We are calling AddRef/Release from multiple threads, and just
RefCounted is very dangerous.
This change also ensures AutomationProvider is always
constructed and destroyed on the same thread: UI.
There might be other issues caused by running dtor
on the wrong thread.
BUG=71066, 71456
TEST=none
Review URL: http://codereview.chromium.org/6347065
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@73328 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/automation/automation_provider_unittest.cc')
-rw-r--r-- | chrome/browser/automation/automation_provider_unittest.cc | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/chrome/browser/automation/automation_provider_unittest.cc b/chrome/browser/automation/automation_provider_unittest.cc index 356d0f4..c931701 100644 --- a/chrome/browser/automation/automation_provider_unittest.cc +++ b/chrome/browser/automation/automation_provider_unittest.cc @@ -2,6 +2,7 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +#include "chrome/browser/browser_thread.h" #include "chrome/browser/automation/chrome_frame_automation_provider.h" #include "ipc/ipc_message.h" #include "testing/gmock/include/gmock/gmock.h" @@ -20,6 +21,9 @@ class MockChromeFrameAutomationProvider }; TEST(AutomationProviderTest, TestInvalidChromeFrameMessage) { + MessageLoop message_loop; + BrowserThread ui_thread(BrowserThread::UI, &message_loop); + IPC::Message bad_msg(1, -1, IPC::Message::PRIORITY_NORMAL); scoped_refptr<MockChromeFrameAutomationProvider> |