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

Unified Diff: plugin/npapi_host_control/win/stream_operation.cc

Issue 149434: Avoid calling Abort from main thread on IBinding created on another thread. I... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/o3d/
Patch Set: Created 11 years, 5 months 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 | « plugin/npapi_host_control/win/stream_operation.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: plugin/npapi_host_control/win/stream_operation.cc
===================================================================
--- plugin/npapi_host_control/win/stream_operation.cc (revision 20337)
+++ plugin/npapi_host_control/win/stream_operation.cc (working copy)
@@ -267,6 +267,11 @@
ULONG ulProgressMax,
ULONG ulStatusCode,
LPCWSTR szStatusText) {
+ if (cancel_requested_) {
+ binding_->Abort();
+ return S_OK;
+ }
+
// Capture URL re-directs and MIME-type status notifications.
switch (ulStatusCode) {
case BINDSTATUS_BEGINDOWNLOADDATA:
@@ -366,6 +371,7 @@
// Don't bother processing any data if the stream has been canceled.
if (cancel_requested_) {
+ binding_->Abort();
return S_OK;
}
@@ -749,8 +755,5 @@
ATLASSERT(binding_ &&
"Cancellation request on a stream that has not been bound.");
cancel_requested_ = true;
- if (binding_) {
- return binding_->Abort();
- }
return S_OK;
}
« no previous file with comments | « plugin/npapi_host_control/win/stream_operation.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698