Commit 0111c3c7 authored by simonb's avatar simonb Committed by Commit bot

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}
parent 702f8e51
...@@ -10,6 +10,8 @@ import android.os.ParcelFileDescriptor; ...@@ -10,6 +10,8 @@ import android.os.ParcelFileDescriptor;
import android.os.Parcelable; import android.os.Parcelable;
import android.util.Log; import android.util.Log;
import org.chromium.base.AccessedByNative;
import org.chromium.base.CalledByNative;
import org.chromium.base.SysUtils; import org.chromium.base.SysUtils;
import org.chromium.base.ThreadUtils; import org.chromium.base.ThreadUtils;
...@@ -830,6 +832,7 @@ public class Linker { ...@@ -830,6 +832,7 @@ public class Linker {
* *
* @param opaque Opaque argument. * @param opaque Opaque argument.
*/ */
@CalledByNative
public static void postCallbackOnMainThread(final long opaque) { public static void postCallbackOnMainThread(final long opaque) {
ThreadUtils.postOnUiThread(new Runnable() { ThreadUtils.postOnUiThread(new Runnable() {
@Override @Override
...@@ -1008,10 +1011,15 @@ public class Linker { ...@@ -1008,10 +1011,15 @@ public class Linker {
// IMPORTANT: Don't change these fields without modifying the // IMPORTANT: Don't change these fields without modifying the
// native code that accesses them directly! // native code that accesses them directly!
@AccessedByNative
public long mLoadAddress; // page-aligned library load address. public long mLoadAddress; // page-aligned library load address.
@AccessedByNative
public long mLoadSize; // page-aligned library load size. public long mLoadSize; // page-aligned library load size.
@AccessedByNative
public long mRelroStart; // page-aligned address in memory, or 0 if none. public long mRelroStart; // page-aligned address in memory, or 0 if none.
@AccessedByNative
public long mRelroSize; // page-aligned size in memory, or 0. public long mRelroSize; // page-aligned size in memory, or 0.
@AccessedByNative
public int mRelroFd; // ashmem file descriptor, or -1 public int mRelroFd; // ashmem file descriptor, or -1
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment