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

Issue 6203006: Attempt at fixing crash in ProcessPendingTabs. With the current code, (Closed)

Created:
9 years, 11 months ago by sky
Modified:
9 years, 7 months ago
Reviewers:
brettw
CC:
chromium-reviews, Paweł Hajdan Jr.
Visibility:
Public.

Description

Attempt at fixing crash in ProcessPendingTabs. With the current code, during closing a window with unload handlers if a tab is disconnected then we delay cleanup by way of PostTask with the tab being disconnected. During the time between when the disconnect happens and the task is run the unloader handler sets still maintain a reference to the tab. If ProcessPendingTabs is invoked during this window and the tab is deleted, then we can crash. I'm fixing it by making disconnect remove from the sets immediately, but delay the call to ProcessPendingTabs. I'm also doing a similar thing in TabDetachedAt. BUG=15620 TEST=none Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=71327

Patch Set 1 #

Patch Set 2 : move PostTask to ClearUnloadState #

Patch Set 3 : Better comments #

Total comments: 1
Unified diffs Side-by-side diffs Delta from patch set Stats (+27 lines, -17 lines) Patch
M chrome/browser/ui/browser.h View 1 1 chunk +4 lines, -2 lines 1 comment Download
M chrome/browser/ui/browser.cc View 1 2 6 chunks +23 lines, -12 lines 0 comments Download
M chrome/test/data/reliability/known_crashes.txt View 1 chunk +0 lines, -3 lines 0 comments Download

Messages

Total messages: 2 (0 generated)
sky
9 years, 11 months ago (2011-01-12 18:45:11 UTC) #1
brettw
9 years, 11 months ago (2011-01-13 06:42:16 UTC) #2
LGTM

http://codereview.chromium.org/6203006/diff/4001/chrome/browser/ui/browser.h
File chrome/browser/ui/browser.h (right):

http://codereview.chromium.org/6203006/diff/4001/chrome/browser/ui/browser.h#...
chrome/browser/ui/browser.h:914: // Typically you'll want to pass in true for
|process_now|.
It might be nice if this mentioned why you might want to delay processing.

Powered by Google App Engine
This is Rietveld 408576698