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

Unified Diff: base/android/linker/linker_jni.cc

Issue 533173002: Fix conversions from 32-bit pointers to signed 64-bit integers. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Disable debug output Created 6 years, 3 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/android/linker/linker_jni.cc
diff --git a/base/android/linker/linker_jni.cc b/base/android/linker/linker_jni.cc
index 4eb774b69ab9fd88e38022f0192787bee9a6177f..79dd20103e7add06b2b30dd0550193682cbb7d50 100644
--- a/base/android/linker/linker_jni.cc
+++ b/base/android/linker/linker_jni.cc
@@ -452,7 +452,8 @@ static bool PostForLaterExecution(crazy_callback_t* callback_request,
LOG_INFO("%s: Calling back to java with handler %p, opaque %p",
__FUNCTION__, callback->handler, callback->opaque);
- jlong arg = static_cast<jlong>(reinterpret_cast<intptr_t>(callback));
+ jlong arg = static_cast<jlong>(reinterpret_cast<uintptr_t>(callback));
+
env->CallStaticVoidMethod(
s_java_callback_bindings.clazz, s_java_callback_bindings.method_id, arg);
@@ -570,7 +571,7 @@ jlong GetRandomBaseLoadAddress(JNIEnv* env, jclass clazz, jlong bytes) {
}
munmap(address, bytes);
LOG_INFO("%s: Random base load address is %p\n", __FUNCTION__, address);
- return static_cast<jlong>(reinterpret_cast<intptr_t>(address));
+ return static_cast<jlong>(reinterpret_cast<uintptr_t>(address));
}
const JNINativeMethod kNativeMethods[] = {
« 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