| Index: mojo/android/system/base_run_loop.cc
|
| diff --git a/mojo/android/system/base_run_loop.cc b/mojo/android/system/base_run_loop.cc
|
| index f361a94f98c2b1fc10bbba005d3834ef28a23f3a..5d49bfd653adafe1130b02e3b296846544b75df0 100644
|
| --- a/mojo/android/system/base_run_loop.cc
|
| +++ b/mojo/android/system/base_run_loop.cc
|
| @@ -43,19 +43,26 @@ struct MessageLoopHolder {
|
|
|
| } // namespace
|
|
|
| -static jlong CreateBaseRunLoop(JNIEnv* env, jobject jcaller) {
|
| +static jlong CreateBaseRunLoop(JNIEnv* env,
|
| + const JavaParamRef<jobject>& jcaller) {
|
| return reinterpret_cast<uintptr_t>(new MessageLoopHolder());
|
| }
|
|
|
| -static void Run(JNIEnv* env, jobject jcaller, jlong runLoopID) {
|
| +static void Run(JNIEnv* env,
|
| + const JavaParamRef<jobject>& jcaller,
|
| + jlong runLoopID) {
|
| reinterpret_cast<MessageLoopHolder*>(runLoopID)->message_loop->Run();
|
| }
|
|
|
| -static void RunUntilIdle(JNIEnv* env, jobject jcaller, jlong runLoopID) {
|
| +static void RunUntilIdle(JNIEnv* env,
|
| + const JavaParamRef<jobject>& jcaller,
|
| + jlong runLoopID) {
|
| reinterpret_cast<MessageLoopHolder*>(runLoopID)->message_loop->RunUntilIdle();
|
| }
|
|
|
| -static void Quit(JNIEnv* env, jobject jcaller, jlong runLoopID) {
|
| +static void Quit(JNIEnv* env,
|
| + const JavaParamRef<jobject>& jcaller,
|
| + jlong runLoopID) {
|
| reinterpret_cast<MessageLoopHolder*>(runLoopID)->message_loop->Quit();
|
| }
|
|
|
| @@ -66,9 +73,9 @@ static void RunJavaRunnable(
|
| }
|
|
|
| static void PostDelayedTask(JNIEnv* env,
|
| - jobject jcaller,
|
| + const JavaParamRef<jobject>& jcaller,
|
| jlong runLoopID,
|
| - jobject runnable,
|
| + const JavaParamRef<jobject>& runnable,
|
| jlong delay) {
|
| base::android::ScopedJavaGlobalRef<jobject> runnable_ref;
|
| // ScopedJavaGlobalRef do not hold onto the env reference, so it is safe to
|
| @@ -81,7 +88,9 @@ static void PostDelayedTask(JNIEnv* env,
|
| base::TimeDelta::FromMicroseconds(delay));
|
| }
|
|
|
| -static void DeleteMessageLoop(JNIEnv* env, jobject jcaller, jlong runLoopID) {
|
| +static void DeleteMessageLoop(JNIEnv* env,
|
| + const JavaParamRef<jobject>& jcaller,
|
| + jlong runLoopID) {
|
| MessageLoopHolder* native_loop =
|
| reinterpret_cast<MessageLoopHolder*>(runLoopID);
|
| delete native_loop;
|
| @@ -93,5 +102,3 @@ bool RegisterBaseRunLoop(JNIEnv* env) {
|
|
|
| } // namespace android
|
| } // namespace mojo
|
| -
|
| -
|
|
|