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

Unified Diff: content/browser/cancelable_request.h

Issue 7001015: Let CancelableRequest Execute callbacks which do delete this. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix comment. Created 9 years, 7 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: content/browser/cancelable_request.h
diff --git a/content/browser/cancelable_request.h b/content/browser/cancelable_request.h
index 009ca98bf84e591ccabd65391f985eb0184860c2..5cfa4c4022775380c033fff2911ff7bc75501c41 100644
--- a/content/browser/cancelable_request.h
+++ b/content/browser/cancelable_request.h
@@ -659,11 +659,13 @@ class CancelableRequest : public CancelableRequestBase {
// Execute the callback.
callback_->RunWithParams(param);
+ }
- // Notify the provider that the request is complete. The provider will
- // notify the consumer for us.
+ // Notify the provider that the request is complete. The provider will
+ // notify the consumer for us. Note that in the case where the callback
+ // does |delete this|, we may be canceled when the callback returns.
+ if (!canceled_.IsSet())
sky 2011/05/10 22:56:29 If 'this' has been deleted by RunWIthParams, than
Sheridan Rawlins 2011/05/10 23:09:48 Ok, so the comment is wrong. It does technically
NotifyCompleted();
- }
}
// This should only be executed if !canceled_.IsSet(),
« 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