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

Issue 43135: Fix some browser shutdown issues on Linux. (Closed)

Created:
11 years, 9 months ago by Dean McNamee
Modified:
9 years, 7 months ago
CC:
chromium-reviews_googlegroups.com
Visibility:
Public.

Description

Fix some browser shutdown issues on Linux. The previous code ended up destroying the BrowserWindow (removing it from BrowserList) while BrowserList was in the middle of iterating. Push the deletion onto the message loop (using DeleteSoon) to emulate what I'm guessing happens on Windows (the message is queue instead of processed right away). This fixes a second bug involving re-entrancy issues with Close() and window_, we now make sure to set window_ to NULL before any events might fire. BUG=8712

Patch Set 1 #

Patch Set 2 : Patch against other branch #

Total comments: 1
Unified diffs Side-by-side diffs Delta from patch set Stats (+27 lines, -8 lines) Patch
M chrome/browser/gtk/browser_window_gtk.h View 1 chunk +2 lines, -0 lines 0 comments Download
M chrome/browser/gtk/browser_window_gtk.cc View 5 chunks +25 lines, -8 lines 1 comment Download

Messages

Total messages: 6 (0 generated)
Dean McNamee
This is kind of gnarly, and I hate to use DeleteSoon. Ben, can you confirm ...
11 years, 9 months ago (2009-03-12 15:17:07 UTC) #1
Dean McNamee
After digging, WidgetWin::Close() also posts a task to schedule closing the window. We now schedule ...
11 years, 9 months ago (2009-03-12 15:27:54 UTC) #2
Evan Martin
This feels gnarly to me and I don't understand it. You asked: "Evan, can you ...
11 years, 9 months ago (2009-03-12 17:35:42 UTC) #3
Dean McNamee
Hey Evan, Thanks, this was super helpful. I am starting to think of it differently, ...
11 years, 9 months ago (2009-03-12 17:47:06 UTC) #4
darin (slow to review)
http://codereview.chromium.org/43135/diff/6/7 File chrome/browser/gtk/browser_window_gtk.cc (right): http://codereview.chromium.org/43135/diff/6/7#newcode434 Line 434: MessageLoop::current()->DeleteSoon(FROM_HERE, browser_win); i love problems like this :-P ...
11 years, 9 months ago (2009-03-12 22:26:25 UTC) #5
Dean McNamee
11 years, 9 months ago (2009-03-13 13:31:05 UTC) #6
Hey Evan,

I updated the bug with some more details about what's happening on Windows. 
Basically from what I can tell, it does basically what this code is doing.  I am
going to commit this, although I agree it is a bit gnarly, I don't see an
obvious way around it right now.

Powered by Google App Engine
This is Rietveld 408576698