summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorsimonb <simonb@chromium.org>2014-09-03 10:54:51 -0700
committerCommit bot <commit-bot@chromium.org>2014-09-03 18:05:57 +0000
commit0111c3c794bb2c0bb9b9dce92ec8fdd790d620a8 (patch)
tree0b824a457be0b30f84912494ab6568ec1c82b062
parent702f8e51da4b25cbba661e3f81533f5dcfc53af2 (diff)
downloadchromium_src-0111c3c794bb2c0bb9b9dce92ec8fdd790d620a8.zip
chromium_src-0111c3c794bb2c0bb9b9dce92ec8fdd790d620a8.tar.gz
chromium_src-0111c3c794bb2c0bb9b9dce92ec8fdd790d620a8.tar.bz2
Add @CalledByNative and @AccessedByNative annotations.
Annotate postCallbackOnMainThread() method with @CalledByNative, and LibInfo fields with @AccessedByNative, for ProGuard. BUG= Review URL: https://codereview.chromium.org/539523003 Cr-Commit-Position: refs/heads/master@{#293168}
-rw-r--r--base/android/java/src/org/chromium/base/library_loader/Linker.java8
1 files changed, 8 insertions, 0 deletions
diff --git a/base/android/java/src/org/chromium/base/library_loader/Linker.java b/base/android/java/src/org/chromium/base/library_loader/Linker.java
index d09572a..d33131f 100644
--- a/base/android/java/src/org/chromium/base/library_loader/Linker.java
+++ b/base/android/java/src/org/chromium/base/library_loader/Linker.java
@@ -10,6 +10,8 @@ import android.os.ParcelFileDescriptor;
import android.os.Parcelable;
import android.util.Log;
+import org.chromium.base.AccessedByNative;
+import org.chromium.base.CalledByNative;
import org.chromium.base.SysUtils;
import org.chromium.base.ThreadUtils;
@@ -830,6 +832,7 @@ public class Linker {
*
* @param opaque Opaque argument.
*/
+ @CalledByNative
public static void postCallbackOnMainThread(final long opaque) {
ThreadUtils.postOnUiThread(new Runnable() {
@Override
@@ -1008,10 +1011,15 @@ public class Linker {
// IMPORTANT: Don't change these fields without modifying the
// native code that accesses them directly!
+ @AccessedByNative
public long mLoadAddress; // page-aligned library load address.
+ @AccessedByNative
public long mLoadSize; // page-aligned library load size.
+ @AccessedByNative
public long mRelroStart; // page-aligned address in memory, or 0 if none.
+ @AccessedByNative
public long mRelroSize; // page-aligned size in memory, or 0.
+ @AccessedByNative
public int mRelroFd; // ashmem file descriptor, or -1
}