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

Side by Side Diff: mojo/android/system/core_impl.cc

Issue 841443006: Fix signed/unsigned comparison mismatch (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Created 5 years, 11 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 unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "mojo/android/system/core_impl.h" 5 #include "mojo/android/system/core_impl.h"
6 6
7 #include "base/android/base_jni_registrar.h" 7 #include "base/android/base_jni_registrar.h"
8 #include "base/android/jni_android.h" 8 #include "base/android/jni_android.h"
9 #include "base/android/jni_registrar.h" 9 #include "base/android/jni_registrar.h"
10 #include "base/android/library_loader/library_loader_hooks.h" 10 #include "base/android/library_loader/library_loader_hooks.h"
(...skipping 145 matching lines...) Expand 10 before | Expand all | Expand 10 after
156 jobject jcaller, 156 jobject jcaller,
157 jobject buffer, 157 jobject buffer,
158 jint mojo_handle, 158 jint mojo_handle,
159 jint signals, 159 jint signals,
160 jlong deadline) { 160 jlong deadline) {
161 // Buffer contains space for the MojoHandleSignalsState 161 // Buffer contains space for the MojoHandleSignalsState
162 void* buffer_start = env->GetDirectBufferAddress(buffer); 162 void* buffer_start = env->GetDirectBufferAddress(buffer);
163 DCHECK(buffer_start); 163 DCHECK(buffer_start);
164 DCHECK_EQ(reinterpret_cast<const uintptr_t>(buffer_start) % 8, 0u); 164 DCHECK_EQ(reinterpret_cast<const uintptr_t>(buffer_start) % 8, 0u);
165 DCHECK_EQ(sizeof(struct MojoHandleSignalsState), 165 DCHECK_EQ(sizeof(struct MojoHandleSignalsState),
166 env->GetDirectBufferCapacity(buffer)); 166 static_cast<size_t>(env->GetDirectBufferCapacity(buffer)));
167 struct MojoHandleSignalsState* signals_state = 167 struct MojoHandleSignalsState* signals_state =
168 static_cast<struct MojoHandleSignalsState*>(buffer_start); 168 static_cast<struct MojoHandleSignalsState*>(buffer_start);
169 return MojoWait(mojo_handle, signals, deadline, signals_state); 169 return MojoWait(mojo_handle, signals, deadline, signals_state);
170 } 170 }
171 171
172 static jint WriteMessage(JNIEnv* env, 172 static jint WriteMessage(JNIEnv* env,
173 jobject jcaller, 173 jobject jcaller,
174 jint mojo_handle, 174 jint mojo_handle,
175 jobject bytes, 175 jobject bytes,
176 jint num_bytes, 176 jint num_bytes,
(...skipping 217 matching lines...) Expand 10 before | Expand all | Expand 10 after
394 reinterpret_cast<AsyncWaitCallbackData*>(data_ptr)); 394 reinterpret_cast<AsyncWaitCallbackData*>(data_ptr));
395 Environment::GetDefaultAsyncWaiter()->CancelWait(id); 395 Environment::GetDefaultAsyncWaiter()->CancelWait(id);
396 } 396 }
397 397
398 bool RegisterCoreImpl(JNIEnv* env) { 398 bool RegisterCoreImpl(JNIEnv* env) {
399 return RegisterNativesImpl(env); 399 return RegisterNativesImpl(env);
400 } 400 }
401 401
402 } // namespace android 402 } // namespace android
403 } // namespace mojo 403 } // namespace mojo
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698