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

Issue 1136373003: AppCache: Ensure inflight ActiveCalls are not destroyed (Closed)

Created:
5 years, 7 months ago by nhiroki
Modified:
5 years, 7 months ago
Reviewers:
michaeln
CC:
chromium-reviews, michaeln, darin-cc_chromium.org, jam, serviceworker-reviews, kinuko
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

AppCache: Ensure inflight ActiveCalls are not destroyed Before this CL, AppCacheDiskCache could delete inflight ActiveCalls without any abort operation when the backend is disabled, so callbacks bound with ActiveCall objects are invoked in broken state. After this CL, ActiveCall hides its constructor and manages its own lifetime using refptr, so AppCacheDiskCache no longer has to take care of their lifetime. In addition, AppCacheDiskCache passes its weakptr to ActiveCall, which in turn checks it when an operation is completed. If the backend is closed, ActiveCall closes the entry and returns net::ERR_ABORTED. BUG=488757 TEST=n/a Committed: https://crrev.com/25d1cd1fefacd75c8537ebdc4b2f4ef11a01bdba Cr-Commit-Position: refs/heads/master@{#330250}

Patch Set 1 : #

Total comments: 2

Patch Set 2 : remake #

Patch Set 3 : fix test failures #

Total comments: 3

Patch Set 4 : Make ActiveCall RefCounted #

Patch Set 5 : fix win build failures #

Unified diffs Side-by-side diffs Delta from patch set Stats (+68 lines, -46 lines) Patch
M content/browser/appcache/appcache_disk_cache.h View 1 2 chunks +2 lines, -3 lines 0 comments Download
M content/browser/appcache/appcache_disk_cache.cc View 1 2 3 4 6 chunks +66 lines, -43 lines 0 comments Download

Messages

Total messages: 20 (7 generated)
nhiroki
Hi michaeln@, can you review this? I met an error caused by this while I ...
5 years, 7 months ago (2015-05-13 11:32:33 UTC) #4
michaeln
https://codereview.chromium.org/1136373003/diff/40001/content/browser/appcache/appcache_disk_cache.cc File content/browser/appcache/appcache_disk_cache.cc (right): https://codereview.chromium.org/1136373003/diff/40001/content/browser/appcache/appcache_disk_cache.cc#newcode130 content/browser/appcache/appcache_disk_cache.cc:130: base::Bind(&ActiveCall::OnAsyncCompletion, weak_factory_.GetWeakPtr())); I remember there being a difference in ...
5 years, 7 months ago (2015-05-14 02:25:01 UTC) #5
nhiroki
Thank you for reviewing. Comment reply only. https://codereview.chromium.org/1136373003/diff/40001/content/browser/appcache/appcache_disk_cache.cc File content/browser/appcache/appcache_disk_cache.cc (right): https://codereview.chromium.org/1136373003/diff/40001/content/browser/appcache/appcache_disk_cache.cc#newcode130 content/browser/appcache/appcache_disk_cache.cc:130: base::Bind(&ActiveCall::OnAsyncCompletion, weak_factory_.GetWeakPtr())); ...
5 years, 7 months ago (2015-05-14 04:27:06 UTC) #6
nhiroki
On 2015/05/14 04:27:06, nhiroki wrote: > Thank you for reviewing. Comment reply only. > > ...
5 years, 7 months ago (2015-05-14 05:23:36 UTC) #9
nhiroki
Updated. Can you take another look? In the new patchset, ... (1) AppCacheDiskCache passes its ...
5 years, 7 months ago (2015-05-14 05:26:25 UTC) #10
michaeln
https://codereview.chromium.org/1136373003/diff/140001/content/browser/appcache/appcache_disk_cache.cc File content/browser/appcache/appcache_disk_cache.cc (right): https://codereview.chromium.org/1136373003/diff/140001/content/browser/appcache/appcache_disk_cache.cc#newcode126 content/browser/appcache/appcache_disk_cache.cc:126: base::Unretained(active_call))); Hmmm... I think this will leak ActiveCall instances ...
5 years, 7 months ago (2015-05-14 23:24:00 UTC) #12
nhiroki
https://codereview.chromium.org/1136373003/diff/140001/content/browser/appcache/appcache_disk_cache.cc File content/browser/appcache/appcache_disk_cache.cc (right): https://codereview.chromium.org/1136373003/diff/140001/content/browser/appcache/appcache_disk_cache.cc#newcode126 content/browser/appcache/appcache_disk_cache.cc:126: base::Unretained(active_call))); On 2015/05/14 23:24:00, michaeln wrote: > Hmmm... I ...
5 years, 7 months ago (2015-05-15 00:42:08 UTC) #13
nhiroki
https://codereview.chromium.org/1136373003/diff/140001/content/browser/appcache/appcache_disk_cache.cc File content/browser/appcache/appcache_disk_cache.cc (right): https://codereview.chromium.org/1136373003/diff/140001/content/browser/appcache/appcache_disk_cache.cc#newcode126 content/browser/appcache/appcache_disk_cache.cc:126: base::Unretained(active_call))); On 2015/05/15 00:42:08, nhiroki wrote: > On 2015/05/14 ...
5 years, 7 months ago (2015-05-15 01:02:26 UTC) #14
michaeln
lgtm!
5 years, 7 months ago (2015-05-15 20:32:51 UTC) #15
nhiroki
Thank you!
5 years, 7 months ago (2015-05-16 00:35:11 UTC) #16
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1136373003/180001
5 years, 7 months ago (2015-05-16 00:36:32 UTC) #18
commit-bot: I haz the power
Committed patchset #5 (id:180001)
5 years, 7 months ago (2015-05-16 00:42:38 UTC) #19
commit-bot: I haz the power
5 years, 7 months ago (2015-05-18 11:30:01 UTC) #20
Message was sent while issue was closed.
Patchset 5 (id:??) landed as
https://crrev.com/25d1cd1fefacd75c8537ebdc4b2f4ef11a01bdba
Cr-Commit-Position: refs/heads/master@{#330250}

Powered by Google App Engine
This is Rietveld 408576698