Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(320)

Unified Diff: chrome_frame/plugin_url_request.cc

Issue 39203004: [Net] Fix error handling on wrong file in UploadData (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome_frame/chrome_frame.gyp ('k') | chrome_frame/urlmon_upload_data_stream.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome_frame/plugin_url_request.cc
diff --git a/chrome_frame/plugin_url_request.cc b/chrome_frame/plugin_url_request.cc
index cfc798b712556074e4dffb45319ad62d52610b03..1c3c46404bb4b1b96c297708f2f1630f03379c68 100644
--- a/chrome_frame/plugin_url_request.cc
+++ b/chrome_frame/plugin_url_request.cc
@@ -32,6 +32,7 @@ bool PluginUrlRequest::Initialize(PluginUrlRequestDelegate* delegate,
extra_headers_ = extra_headers;
resource_type_ = resource_type;
load_flags_ = load_flags;
+ enable_frame_busting_ = enable_frame_busting;
if (upload_data) {
// We store a pointer to UrlmonUploadDataStream and not net::UploadData
@@ -44,7 +45,11 @@ bool PluginUrlRequest::Initialize(PluginUrlRequestDelegate* delegate,
NOTREACHED();
} else {
upload_stream->AddRef();
- upload_stream->Initialize(upload_data);
+ if (!upload_stream->Initialize(upload_data)) {
+ upload_stream->Release();
+ return true;
+ }
+
upload_data_.Attach(upload_stream);
is_chunked_upload_ = upload_data->is_chunked();
STATSTG stat;
@@ -53,7 +58,5 @@ bool PluginUrlRequest::Initialize(PluginUrlRequestDelegate* delegate,
}
}
- enable_frame_busting_ = enable_frame_busting;
-
return true;
}
« no previous file with comments | « chrome_frame/chrome_frame.gyp ('k') | chrome_frame/urlmon_upload_data_stream.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698