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

Unified Diff: chrome_frame/urlmon_url_request.cc

Issue 3159045: Fix a crash when delegate_ goes away in ReadStream... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 10 years, 4 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome_frame/urlmon_url_request.cc
===================================================================
--- chrome_frame/urlmon_url_request.cc (revision 55885)
+++ chrome_frame/urlmon_url_request.cc (working copy)
@@ -221,7 +221,9 @@
if (bytes_copied) {
++calling_delegate_;
DCHECK_NE(id(), -1);
- delegate_->OnReadComplete(id(), read_data);
+ // The delegate can go away in the middle of ReadStream
+ if (delegate_)
+ delegate_->OnReadComplete(id(), read_data);
--calling_delegate_;
}
} else {
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698