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, |