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

Unified Diff: mojo/services/native_viewport/native_viewport_service.cc

Issue 372273004: Shutdown cleanup (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 6 years, 5 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: mojo/services/native_viewport/native_viewport_service.cc
diff --git a/mojo/services/native_viewport/native_viewport_service.cc b/mojo/services/native_viewport/native_viewport_service.cc
index 1db489b8375382e7f202a9674425047aa89350f3..b7c80524c78349e953c76582ee914b72f9eea57f 100644
--- a/mojo/services/native_viewport/native_viewport_service.cc
+++ b/mojo/services/native_viewport/native_viewport_service.cc
@@ -137,12 +137,15 @@ class NativeViewportImpl
}
virtual void OnDestroyed() OVERRIDE {
- command_buffer_.reset();
- client()->OnDestroyed();
- base::MessageLoop::current()->Quit();
+ client()->OnDestroyed(base::Bind(&NativeViewportImpl::AckDestroyed,
+ base::Unretained(this)));
}
private:
+ void AckDestroyed() {
+ command_buffer_.reset();
+ }
+
shell::Context* context_;
gfx::AcceleratedWidget widget_;
scoped_ptr<services::NativeViewport> native_viewport_;

Powered by Google App Engine
This is Rietveld 408576698