Chromium Code Reviews| 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(), |