summaryrefslogtreecommitdiffstats
path: root/chrome_frame/npapi_url_request.cc
diff options
context:
space:
mode:
authorrobertshield@chromium.org <robertshield@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-03-31 23:42:20 +0000
committerrobertshield@chromium.org <robertshield@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-03-31 23:42:20 +0000
commit4638c7d39d1652f7b9363e14dd6f52310f7103c0 (patch)
tree5f91a69f94ddb0c11568e02a7c3b1648fab01313 /chrome_frame/npapi_url_request.cc
parent8e2f6646eb8ecb8805983f6816af280f214818b0 (diff)
downloadchromium_src-4638c7d39d1652f7b9363e14dd6f52310f7103c0.zip
chromium_src-4638c7d39d1652f7b9363e14dd6f52310f7103c0.tar.gz
chromium_src-4638c7d39d1652f7b9363e14dd6f52310f7103c0.tar.bz2
Fix a crash whereby a non-thread-safe ref-counted net::UploadData is used between threads. This patch does this by wrapping the UploadData structure in a thread-safe container for use between threads.
BUG=39453 TEST=none Review URL: http://codereview.chromium.org/1508012 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@43287 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome_frame/npapi_url_request.cc')
-rw-r--r--chrome_frame/npapi_url_request.cc5
1 files changed, 3 insertions, 2 deletions
diff --git a/chrome_frame/npapi_url_request.cc b/chrome_frame/npapi_url_request.cc
index c71659a..f928327 100644
--- a/chrome_frame/npapi_url_request.cc
+++ b/chrome_frame/npapi_url_request.cc
@@ -198,12 +198,13 @@ bool NPAPIUrlRequestManager::IsThreadSafe() {
}
void NPAPIUrlRequestManager::StartRequest(int request_id,
- const IPC::AutomationURLRequest& request_info) {
+ const ThreadSafeAutomationUrlRequest& request_info) {
scoped_refptr<NPAPIUrlRequest> new_request(new NPAPIUrlRequest(instance_));
DCHECK(new_request);
if (new_request->Initialize(this, request_id, request_info.url,
request_info.method, request_info.referrer,
- request_info.extra_request_headers, request_info.upload_data.get(),
+ request_info.extra_request_headers,
+ request_info.upload_data.get()->get_data(),
enable_frame_busting_)) {
// Add to map.
DCHECK(request_map_.find(request_id) == request_map_.end());