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

Issue 7001015: Let CancelableRequest Execute callbacks which do delete this. (Closed)

Created:
9 years, 7 months ago by Sheridan Rawlins
Modified:
9 years, 6 months ago
Reviewers:
brettw, sky
CC:
chromium-reviews, jam, dennis_jeffrey, stuartmorgan, Miranda Callahan
Visibility:
Public.

Description

Let CancelableRequest Execute callbacks which do delete this. By checking canceled() again before calling NotifyCompleted, we avoid assumptions that we're not canceled from the callback. This solves 2 issues: 1) The NOTREACHED in the provider which tries to remove the pending_request. 2) Trying to call DidExecute on a deleted consumer_. BUG=77777, 82156 R=sky@chromium.org TEST=python chrome/test/functional/imports.py imports.ImportsTest.testImportFirefoxDataTwice Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=84889

Patch Set 1 #

Patch Set 2 : Fix comment. #

Total comments: 2

Patch Set 3 : Remove comment's ambiguous |delete this|. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+5 lines, -3 lines) Patch
M content/browser/cancelable_request.h View 1 2 1 chunk +5 lines, -3 lines 0 comments Download

Messages

Total messages: 6 (0 generated)
Sheridan Rawlins
Ok, here's my fix to callbacks which do delete this. Brett, please have a look ...
9 years, 7 months ago (2011-05-10 22:16:14 UTC) #1
sky
http://codereview.chromium.org/7001015/diff/2002/content/browser/cancelable_request.h File content/browser/cancelable_request.h (right): http://codereview.chromium.org/7001015/diff/2002/content/browser/cancelable_request.h#newcode667 content/browser/cancelable_request.h:667: if (!canceled_.IsSet()) If 'this' has been deleted by RunWIthParams, ...
9 years, 7 months ago (2011-05-10 22:56:29 UTC) #2
brettw
I think this is OK. The thing that's getting deleted is the consumer. The request ...
9 years, 7 months ago (2011-05-10 22:59:09 UTC) #3
brettw
LGTM if my above understanding is correct.
9 years, 7 months ago (2011-05-10 22:59:19 UTC) #4
Sheridan Rawlins
Brett, your understanding is correct . I fixed the comment to make it more focused ...
9 years, 7 months ago (2011-05-10 23:09:48 UTC) #5
sky
9 years, 7 months ago (2011-05-10 23:13:54 UTC) #6
Sorry, Brett's right. LGTM

Powered by Google App Engine
This is Rietveld 408576698