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

Unified Diff: mojo/runner/android/native_viewport_application_loader.cc

Issue 1139673003: Make Mandoline shut down cleanly. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix crash in surfaces if surfaceimpl outlives the app, and a double delete in browser Created 5 years, 7 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/runner/android/native_viewport_application_loader.cc
diff --git a/mojo/runner/android/native_viewport_application_loader.cc b/mojo/runner/android/native_viewport_application_loader.cc
index 815cc05374af77acf8703458953bb45ceab71203..41fc429ff0acc616c56c39f42f112a60d1dc70c3 100644
--- a/mojo/runner/android/native_viewport_application_loader.cc
+++ b/mojo/runner/android/native_viewport_application_loader.cc
@@ -36,7 +36,12 @@ void NativeViewportApplicationLoader::Create(
InterfaceRequest<NativeViewport> request) {
if (!gpu_state_)
gpu_state_ = new gles2::GpuState;
- new native_viewport::NativeViewportImpl(false, gpu_state_, request.Pass());
+ // Pass a null ServiceRefcount because on Android the NativeViewPort app must
+ // live on the main thread and we don't want to exit that when all the native
+ // viewports are gone.
+ new native_viewport::NativeViewportImpl(
+ false, gpu_state_, request.Pass(),
+ make_scoped_ptr<mojo::ServiceRefcount>(nullptr));
}
void NativeViewportApplicationLoader::Create(ApplicationConnection* connection,

Powered by Google App Engine
This is Rietveld 408576698