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

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: Remove comment's ambiguous |delete this|. 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..769439f7a75816a1c7bfef3c441bf6798b76a309 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 it is possible for the callback to
+ // cancel this request; we must check canceled again.
+ if (!canceled_.IsSet())
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