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

Issue 2881873002: [reland] Use TaskScheduler instead of SequencedWorkerPool in snapshot_cache.mm. (Closed)

Created:
3 years, 7 months ago by fdoray
Modified:
3 years, 7 months ago
Reviewers:
jif
CC:
chromium-reviews, marq+watch_chromium.org, ios-reviews+chrome_chromium.org, noyau+watch_chromium.org, ios-reviews_chromium.org, pkl (ping after 24h if needed)
Target Ref:
refs/heads/master
Project:
chromium
Visibility:
Public.

Description

[reland] Use TaskScheduler instead of SequencedWorkerPool in snapshot_cache.mm. Reland with fix in test. SequencedWorkerPool is being deprecated in favor of TaskScheduler. BUG=667892 R=jif@chromium.org Review-Url: https://codereview.chromium.org/2881873002 Cr-Original-Commit-Position: refs/heads/master@{#472052} Committed: https://chromium.googlesource.com/chromium/src/+/aa5299ae23a57ca5dce00a11da3ac8e73849351f Review-Url: https://codereview.chromium.org/2881873002 Cr-Commit-Position: refs/heads/master@{#475107} Committed: https://chromium.googlesource.com/chromium/src/+/a11be0d57a4e4f214588bbd6fab9398824802b7f

Patch Set 1 #

Patch Set 2 : USER_VISIBLE #

Patch Set 3 : fix test error #

Patch Set 4 : self-review #

Patch Set 5 : sequence #

Patch Set 6 : self-review #

Patch Set 7 : self-review #

Patch Set 8 : add comment #

Unified diffs Side-by-side diffs Delta from patch set Stats (+24 lines, -17 lines) Patch
M ios/chrome/browser/snapshots/snapshot_cache.mm View 1 2 3 4 5 6 7 7 chunks +22 lines, -14 lines 0 comments Download
M ios/chrome/browser/snapshots/snapshot_cache_unittest.mm View 1 2 2 chunks +2 lines, -3 lines 0 comments Download

Dependent Patchsets:

Messages

Total messages: 48 (35 generated)
fdoray
3 years, 7 months ago (2017-05-12 17:44:12 UTC) #1
fdoray
Please take a look. This CL was generated automatically. The base::MayBlock() trait was specified for ...
3 years, 7 months ago (2017-05-12 17:44:15 UTC) #3
jif
base::TaskPriority::BACKGROUND is fine for saving snapshots to disk lgtm
3 years, 7 months ago (2017-05-15 08:06:59 UTC) #7
jif
On 2017/05/15 08:06:59, jif wrote: > base::TaskPriority::BACKGROUND is fine for saving snapshots to disk > ...
3 years, 7 months ago (2017-05-15 08:09:09 UTC) #8
fdoray
PTAnL
3 years, 7 months ago (2017-05-15 17:29:21 UTC) #10
jif
lgtm, thank you.
3 years, 7 months ago (2017-05-16 09:15:39 UTC) #14
commit-bot: I haz the power
CQ is trying da patch. Follow status at: https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2881873002/20001
3 years, 7 months ago (2017-05-16 09:25:40 UTC) #16
commit-bot: I haz the power
Committed patchset #2 (id:20001) as https://chromium.googlesource.com/chromium/src/+/aa5299ae23a57ca5dce00a11da3ac8e73849351f
3 years, 7 months ago (2017-05-16 09:31:29 UTC) #19
kolos1
A revert of this CL (patchset #2 id:20001) has been created in https://codereview.chromium.org/2889553002/ by kolos@chromium.org. ...
3 years, 7 months ago (2017-05-16 12:19:39 UTC) #20
commit-bot: I haz the power
CQ is trying da patch. Follow status at: https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2881873002/60001
3 years, 7 months ago (2017-05-26 18:06:53 UTC) #28
commit-bot: I haz the power
CQ is trying da patch. Follow status at: https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2881873002/140001
3 years, 7 months ago (2017-05-26 20:25:17 UTC) #44
commit-bot: I haz the power
Committed patchset #8 (id:140001) as https://chromium.googlesource.com/chromium/src/+/a11be0d57a4e4f214588bbd6fab9398824802b7f
3 years, 7 months ago (2017-05-26 20:29:50 UTC) #47
sdefresne
3 years, 6 months ago (2017-05-30 10:15:05 UTC) #48
Message was sent while issue was closed.
A revert of this CL (patchset #8 id:140001) has been created in
https://codereview.chromium.org/2910183002/ by sdefresne@chromium.org.

The reason for reverting is: This CL is incorrect. SnapshotCache is a singleton
that is indirectly accessed by multiple unit tests (for example MainController
unit tests).

CreateSequencedTaskRunnerWithTraits() returns an object that reference
TaskScheduler::GetInstance(). This TaskScheduler object is detroyed between each
test, thus we have a singleton object pointing to de-allocated memory.

SnapshotCache need to be changed to no longer be a singleton, this is tracked by
https://bugs.chromium.org/p/chromium/issues/detail?id=727597..

Powered by Google App Engine
This is Rietveld 408576698