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

Issue 10214004: Fix destruction concurrency issue in PrerenderLocalPredictor: (Closed)

Created:
8 years, 8 months ago by tburkard
Modified:
8 years, 8 months ago
Reviewers:
cbentzel, brettw
CC:
chromium-reviews, tburkard+watch_chromium.org, cbentzel+watch_chromium.org, dominich+watch_chromium.org, mmenke
Visibility:
Public.

Description

Fix destruction concurrency issue in PrerenderLocalPredictor: PrerenderLocalPredictor will now keep around a reference to the HistoryService that it subscribed too, and will unsubscribe itself on destruction. Since PrerenderLocalPredictor is owned by PrerenderManager, and both PrerenderManager and HistoryService have the same lifetime as the underlying profile, the HistoryService object will not be kept around unnecessarily longer as a result of this. R=brettw, cbentzel Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=133744

Patch Set 1 #

Total comments: 5

Patch Set 2 : #

Unified diffs Side-by-side diffs Delta from patch set Stats (+12 lines, -4 lines) Patch
M chrome/browser/prerender/prerender_local_predictor.h View 1 1 chunk +8 lines, -0 lines 0 comments Download
M chrome/browser/prerender/prerender_local_predictor.cc View 2 chunks +4 lines, -4 lines 0 comments Download

Messages

Total messages: 7 (0 generated)
tburkard
8 years, 8 months ago (2012-04-24 17:58:10 UTC) #1
brettw
lgtm https://chromiumcodereview.appspot.com/10214004/diff/1/chrome/browser/prerender/prerender_local_predictor.h File chrome/browser/prerender/prerender_local_predictor.h (right): https://chromiumcodereview.appspot.com/10214004/diff/1/chrome/browser/prerender/prerender_local_predictor.h#newcode61 chrome/browser/prerender/prerender_local_predictor.h:61: // service. I think it would be worth ...
8 years, 8 months ago (2012-04-24 18:17:14 UTC) #2
cbentzel
https://chromiumcodereview.appspot.com/10214004/diff/1/chrome/browser/prerender/prerender_local_predictor.cc File chrome/browser/prerender/prerender_local_predictor.cc (right): https://chromiumcodereview.appspot.com/10214004/diff/1/chrome/browser/prerender/prerender_local_predictor.cc#newcode97 chrome/browser/prerender/prerender_local_predictor.cc:97: HistoryService* history = GetHistoryIfExists(); Should this be using observing_history_service_?
8 years, 8 months ago (2012-04-24 18:33:57 UTC) #3
tburkard
https://chromiumcodereview.appspot.com/10214004/diff/1/chrome/browser/prerender/prerender_local_predictor.cc File chrome/browser/prerender/prerender_local_predictor.cc (right): https://chromiumcodereview.appspot.com/10214004/diff/1/chrome/browser/prerender/prerender_local_predictor.cc#newcode97 chrome/browser/prerender/prerender_local_predictor.cc:97: HistoryService* history = GetHistoryIfExists(); Makes no difference, since it'd ...
8 years, 8 months ago (2012-04-24 18:39:57 UTC) #4
cbentzel
LGTM https://chromiumcodereview.appspot.com/10214004/diff/1/chrome/browser/prerender/prerender_local_predictor.cc File chrome/browser/prerender/prerender_local_predictor.cc (right): https://chromiumcodereview.appspot.com/10214004/diff/1/chrome/browser/prerender/prerender_local_predictor.cc#newcode97 chrome/browser/prerender/prerender_local_predictor.cc:97: HistoryService* history = GetHistoryIfExists(); On 2012/04/24 18:39:57, tburkard ...
8 years, 8 months ago (2012-04-24 18:47:22 UTC) #5
cbentzel
Also, is there a BUG associated with this?
8 years, 8 months ago (2012-04-24 18:57:02 UTC) #6
tburkard
8 years, 8 months ago (2012-04-24 19:13:40 UTC) #7
No bug.

On Tue, Apr 24, 2012 at 11:57 AM, <cbentzel@chromium.org> wrote:

> Also, is there a BUG associated with this?
>
>
http://codereview.chromium.**org/10214004/<http://codereview.chromium.org/102...
>

Powered by Google App Engine
This is Rietveld 408576698