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

Unified Diff: ui/views/widget/desktop_aura/desktop_root_window_host_x11.cc

Issue 132473007: aura: Destroy the compositor before destroying the backing window. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: destroy-window: Created 6 years, 11 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
« no previous file with comments | « ui/views/widget/desktop_aura/desktop_root_window_host_win.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/views/widget/desktop_aura/desktop_root_window_host_x11.cc
diff --git a/ui/views/widget/desktop_aura/desktop_root_window_host_x11.cc b/ui/views/widget/desktop_aura/desktop_root_window_host_x11.cc
index 71d690f918eccbe2b3b23f909b9f6516d8085537..5b1c88866007860e7ad910d866a170dd799211ac 100644
--- a/ui/views/widget/desktop_aura/desktop_root_window_host_x11.cc
+++ b/ui/views/widget/desktop_aura/desktop_root_window_host_x11.cc
@@ -142,7 +142,6 @@ DesktopWindowTreeHostX11::DesktopWindowTreeHostX11(
}
DesktopWindowTreeHostX11::~DesktopWindowTreeHostX11() {
- DestroyCompositor();
root_window_->window()->ClearProperty(kHostForRootWindow);
aura::client::SetWindowMoveClient(root_window_->window(), NULL);
desktop_native_widget_aura_->OnDesktopWindowTreeHostDestroyed(root_window_);
@@ -320,6 +319,11 @@ void DesktopWindowTreeHostX11::CloseNow() {
desktop_native_widget_aura_->root_window_event_filter()->RemoveHandler(
x11_window_event_filter_.get());
+ // Destroy the compositor before destroying the |xwindow_| since shutdown
+ // may try to swap, and the swap without a window causes an X error, which
+ // causes a crash with in-process renderer.
+ DestroyCompositor();
+
open_windows().remove(xwindow_);
// Actually free our native resources.
base::MessagePumpX11::Current()->RemoveDispatcherForWindow(xwindow_);
« no previous file with comments | « ui/views/widget/desktop_aura/desktop_root_window_host_win.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698