summaryrefslogtreecommitdiffstats
path: root/chrome_frame/chrome_frame_automation.cc
diff options
context:
space:
mode:
authorananta@chromium.org <ananta@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-10-24 17:55:02 +0000
committerananta@chromium.org <ananta@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-10-24 17:55:02 +0000
commit56ee0b56f44f89ab3475756fb95ad98e5e3dbfa1 (patch)
treeb839a2daa8a484fe87c3a94608d8c33f4ee47877 /chrome_frame/chrome_frame_automation.cc
parent6fcdb5d5f85bc9cf5a78cd8816d9ad988ef7a140 (diff)
downloadchromium_src-56ee0b56f44f89ab3475756fb95ad98e5e3dbfa1.zip
chromium_src-56ee0b56f44f89ab3475756fb95ad98e5e3dbfa1.tar.gz
chromium_src-56ee0b56f44f89ab3475756fb95ad98e5e3dbfa1.tar.bz2
Hopefully the last of the fixes to get Chrome Frame tests going again.
1. Added a check in the OnDestroy handler for the ChromeFrame ActiveX as to whether the worker thread is valid before posting a task to it. 2. Added a helper function in ChromeFrameAutomationClient to support asynchronous host network stack requests deletion. If this does not work I will revert the previous CL's. TBR=amit Review URL: http://codereview.chromium.org/338010 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@30010 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome_frame/chrome_frame_automation.cc')
-rw-r--r--chrome_frame/chrome_frame_automation.cc15
1 files changed, 15 insertions, 0 deletions
diff --git a/chrome_frame/chrome_frame_automation.cc b/chrome_frame/chrome_frame_automation.cc
index ecbca0c..4529ca3 100644
--- a/chrome_frame/chrome_frame_automation.cc
+++ b/chrome_frame/chrome_frame_automation.cc
@@ -1049,6 +1049,21 @@ void ChromeFrameAutomationClient::CleanupRequests() {
request_map_.clear();
}
+void ChromeFrameAutomationClient::CleanupAsyncRequests() {
+ RequestMap::iterator index = request_map_.begin();
+ while (index != request_map_.end()) {
+ PluginUrlRequest* request = (*index).second;
+ if (request) {
+ int request_id = request->id();
+ request->Stop();
+ }
+ index++;
+ }
+
+ DCHECK(request_map_.empty());
+ request_map_.clear();
+}
+
bool ChromeFrameAutomationClient::Reinitialize(
ChromeFrameDelegate* delegate) {
if (!tab_.get() || !::IsWindow(chrome_window_)) {