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

Issue 2559323008: [net/predictor] Remove unsafe usage of WeakPtrFactory (Closed)

Created:
4 years ago by Charlie Harrison
Modified:
4 years ago
Reviewers:
mmenke
CC:
chromium-reviews, cbentzel+watch_chromium.org
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

[net/predictor] Remove unsafe usage of WeakPtrFactory The post task to delete the predictor on the IO thread comes from the profile destruction. Thus, callers into the predictor on the UI thread with *valid* profiles are guaranteed to have their IO thread tasks queued before the predictor is torn down on the IO thread. This means we can safely use base::Unretained in place of weak pointers in these cases. BUG=671970 Committed: https://crrev.com/b671a5234f41f1784bd261a7c1eb6010434cd2c2 Cr-Commit-Position: refs/heads/master@{#437704}

Patch Set 1 #

Total comments: 2

Patch Set 2 : s/we have/the caller has/g #

Unified diffs Side-by-side diffs Delta from patch set Stats (+11 lines, -6 lines) Patch
M chrome/browser/net/predictor.cc View 1 2 chunks +11 lines, -6 lines 0 comments Download

Messages

Total messages: 14 (8 generated)
Charlie Harrison
mmenke, here is what we chatted about offline. PTAL?
4 years ago (2016-12-09 21:57:31 UTC) #4
mmenke
LGTM https://codereview.chromium.org/2559323008/diff/1/chrome/browser/net/predictor.cc File chrome/browser/net/predictor.cc (right): https://codereview.chromium.org/2559323008/diff/1/chrome/browser/net/predictor.cc#newcode316 chrome/browser/net/predictor.cc:316: // ShutdownOnUIThread, because we must have a valid ...
4 years ago (2016-12-09 22:01:18 UTC) #5
Charlie Harrison
Thanks, I s/we have/the caller has/ let's CQ it.
4 years ago (2016-12-09 22:03:15 UTC) #6
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/2559323008/20001
4 years ago (2016-12-09 22:04:23 UTC) #9
commit-bot: I haz the power
Committed patchset #2 (id:20001)
4 years ago (2016-12-10 00:04:57 UTC) #12
commit-bot: I haz the power
4 years ago (2016-12-12 14:58:52 UTC) #14
Message was sent while issue was closed.
Patchset 2 (id:??) landed as
https://crrev.com/b671a5234f41f1784bd261a7c1eb6010434cd2c2
Cr-Commit-Position: refs/heads/master@{#437704}

Powered by Google App Engine
This is Rietveld 408576698