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

Unified Diff: sky/tools/debugger/debugger.cc

Issue 695183003: Bring skydebugger closer to clean-shutdown (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Add crbug reference" Created 6 years, 1 month 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 | « sky/tools/debugger/debugger.h ('k') | sky/tools/debugger/debugger.mojom » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sky/tools/debugger/debugger.cc
diff --git a/sky/tools/debugger/debugger.cc b/sky/tools/debugger/debugger.cc
index a764ae59571c80c91cabd70c5865ccbdc5109406..4fdbbe88474418948f5b98dd381a9b708e2c6095 100644
--- a/sky/tools/debugger/debugger.cc
+++ b/sky/tools/debugger/debugger.cc
@@ -66,13 +66,11 @@ void SkyDebugger::OnEmbed(
}
void SkyDebugger::OnViewManagerDisconnected(mojo::ViewManager* view_manager) {
- CHECK(false); // FIXME: This is dead code, why?
view_manager_ = nullptr;
root_ = nullptr;
}
void SkyDebugger::OnViewDestroyed(mojo::View* view) {
- CHECK(false); // FIXME: This is dead code, why?
view->RemoveObserver(this);
}
@@ -101,6 +99,16 @@ void SkyDebugger::NavigateToURL(const mojo::String& url) {
}
}
+void SkyDebugger::Shutdown() {
+ // Make sure we shut down mojo before quitting the message loop or things
+ // like blink::shutdown() may try to talk to the message loop and crash.
+ window_manager_app_.reset();
+
+ // TODO(eseidel): This still hits an X11 error which I don't understand
+ // "X Error of failed request: GLXBadDrawable", crbug.com/430581
+ mojo::ApplicationImpl::Terminate();
+}
+
void SkyDebugger::InjectInspector() {
InspectorServicePtr inspector_service;
mojo::ConnectToService(viewer_services_.get(), &inspector_service);
« no previous file with comments | « sky/tools/debugger/debugger.h ('k') | sky/tools/debugger/debugger.mojom » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698