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

Issue 11727006: Do not recursively delete prerenders from within deleting prerenders. (Closed)

Created:
7 years, 11 months ago by gavinp
Modified:
7 years, 11 months ago
Reviewers:
mmenke
CC:
chromium-reviews, tburkard+watch_chromium.org, gavinp+prer_chromium.org, cbentzel+watch_chromium.org, dominich+watch_chromium.org, mmenke
Visibility:
Public.

Description

Do not recursively delete prerenders from within deleting prerenders. If a prerender is destroyed, and that reveals another runnable prerender, then we end up calling PrerenderManager::AddPrerender(), which calls to_delete_prerenders_.clear(), which deletes the prerender contents, setting the stage for problems when we continue executing PrerenderContents::Destroy(). There's two ways to fix this, but only one that works; my first thought was to make the stop notification the last thing in Destroy, but that's no good, since there could be multiple observers (and there's usually two, could be three or more...), and so we're safer that way, but it's not perfect. The better option is to just rely on periodic cleanups to clear the pending delete list. The list was cleared in the old PrerenderManager::AddPrerender code because we used to do eviction there, so it was important to be clean. But that's less important now. R=mmenke@chromium.org BUG=167877 Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=174813

Patch Set 1 #

Total comments: 4

Patch Set 2 : remediate #

Patch Set 3 : EXPECT -> ASSERT #

Unified diffs Side-by-side diffs Delta from patch set Stats (+50 lines, -3 lines) Patch
M chrome/browser/prerender/prerender_manager.cc View 1 chunk +0 lines, -3 lines 0 comments Download
M chrome/browser/prerender/prerender_unittest.cc View 1 2 1 chunk +50 lines, -0 lines 0 comments Download

Messages

Total messages: 7 (0 generated)
gavinp
Matt, WDYT? Found this in crash dumps, sadly. It was foreshadowed in our code reviews ...
7 years, 11 months ago (2013-01-01 17:24:27 UTC) #1
mmenke
LGTM. Hmm... I seem to recall suggesting a test that did this. :) https://codereview.chromium.org/11727006/diff/1/chrome/browser/prerender/prerender_unittest.cc File ...
7 years, 11 months ago (2013-01-01 18:18:36 UTC) #2
gavinp
Thanks! https://codereview.chromium.org/11727006/diff/1/chrome/browser/prerender/prerender_unittest.cc File chrome/browser/prerender/prerender_unittest.cc (right): https://codereview.chromium.org/11727006/diff/1/chrome/browser/prerender/prerender_unittest.cc#newcode1380 chrome/browser/prerender/prerender_unittest.cc:1380: TimeDelta::FromSeconds(1); On 2013/01/01 18:18:36, Matt Menke wrote: > ...
7 years, 11 months ago (2013-01-02 14:54:04 UTC) #3
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/gavinp@chromium.org/11727006/5003
7 years, 11 months ago (2013-01-02 14:54:19 UTC) #4
commit-bot: I haz the power
Commit queue rejected this change because the description was changed between the time the change ...
7 years, 11 months ago (2013-01-02 16:58:22 UTC) #5
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/gavinp@chromium.org/11727006/5003
7 years, 11 months ago (2013-01-02 18:10:01 UTC) #6
commit-bot: I haz the power
7 years, 11 months ago (2013-01-02 18:10:16 UTC) #7
Message was sent while issue was closed.
Change committed as 174813

Powered by Google App Engine
This is Rietveld 408576698