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

Unified Diff: chrome/browser/ui/browser.cc

Issue 8369013: Fix the segfault on Linux when closing a tab that is in tab fullscreen mode. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/browser/ui/browser.cc
diff --git a/chrome/browser/ui/browser.cc b/chrome/browser/ui/browser.cc
index 09a522d1bf3291e57d8ae6d9fb2f7e7d74746c0f..f8fc455e8ac57cd6f12cfb9b30ab3ff56b118982 100644
--- a/chrome/browser/ui/browser.cc
+++ b/chrome/browser/ui/browser.cc
@@ -3201,6 +3201,15 @@ void Browser::TabInsertedAt(TabContentsWrapper* contents,
void Browser::TabClosingAt(TabStripModel* tab_strip_model,
TabContentsWrapper* contents,
int index) {
+ if (fullscreened_tab_ == contents) {
+ ExitTabbedFullscreenModeIfNecessary();
+ // The call to exit fullscreen may result in asynchronous notification of
+ // fullscreen state change (e.g., on Linux). We don't want to rely on it
+ // to call NotifyTabOfFullscreenExitIfNecessary(), because at that point
+ // |fullscreen_tab_| may not be valid. Instead, we call it here to clean up
+ // tab fullscreen related state.
+ NotifyTabOfFullscreenExitIfNecessary();
+ }
content::NotificationService::current()->Notify(
content::NOTIFICATION_TAB_CLOSING,
content::Source<NavigationController>(&contents->controller()),
« no previous file with comments | « no previous file | chrome/browser/ui/browser_browsertest.cc » ('j') | chrome/browser/ui/gtk/fullscreen_exit_bubble_gtk.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698