diff options
author | stoyan@chromium.org <stoyan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-09-02 16:17:37 +0000 |
---|---|---|
committer | stoyan@chromium.org <stoyan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-09-02 16:17:37 +0000 |
commit | 3e31d328e0c48880afc4097ce86e62576df99b62 (patch) | |
tree | 21557f52a8253471e3b768a8ab39557a39555fe6 /chrome_frame | |
parent | 9a5e7286848eca769adfaa18792dd9e502e8ae4e (diff) | |
download | chromium_src-3e31d328e0c48880afc4097ce86e62576df99b62.zip chromium_src-3e31d328e0c48880afc4097ce86e62576df99b62.tar.gz chromium_src-3e31d328e0c48880afc4097ce86e62576df99b62.tar.bz2 |
Add lock since the add/remove tabproxy is invoked from different threads.
BUG=53963
Review URL: http://codereview.chromium.org/3306003
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@58367 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome_frame')
-rw-r--r-- | chrome_frame/chrome_frame_automation.cc | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/chrome_frame/chrome_frame_automation.cc b/chrome_frame/chrome_frame_automation.cc index 6f31bf7..908df61d 100644 --- a/chrome_frame/chrome_frame_automation.cc +++ b/chrome_frame/chrome_frame_automation.cc @@ -51,10 +51,12 @@ class ChromeFrameAutomationProxyImpl::TabProxyNotificationMessageFilter } void AddTabProxy(AutomationHandle tab_proxy) { + AutoLock lock(lock_); tabs_list_.push_back(tab_proxy); } void RemoveTabProxy(AutomationHandle tab_proxy) { + AutoLock lock(lock_); tabs_list_.remove(tab_proxy); } @@ -92,6 +94,7 @@ class ChromeFrameAutomationProxyImpl::TabProxyNotificationMessageFilter private: AutomationHandleTracker* tracker_; std::list<AutomationHandle> tabs_list_; + Lock lock_; }; class ChromeFrameAutomationProxyImpl::CFMsgDispatcher |