Bug 1182641 - Use new autogenerated native methods for ANRReporter; r=snorp
authorJim Chen <nchen@mozilla.com>
Wed, 29 Jul 2015 15:11:14 -0400
changeset 281598 572e4ffbc46d7365f922f8392f5d8e3caa4d607f
parent 281597 cef69a78f01614d31fdb7705816f7dc8fd807d62
child 281599 3b135e6cfe076a81a5f68a7262a9300d2a760bbf
push id3894
push usermconley@mozilla.com
push dateThu, 30 Jul 2015 00:27:47 +0000
reviewerssnorp
bugs1182641
milestone42.0a1
Bug 1182641 - Use new autogenerated native methods for ANRReporter; r=snorp
mobile/android/base/ANRReporter.java
mobile/android/base/Makefile.in
--- a/mobile/android/base/ANRReporter.java
+++ b/mobile/android/base/ANRReporter.java
@@ -16,16 +16,17 @@ import java.io.InputStreamReader;
 import java.io.OutputStream;
 import java.io.Reader;
 import java.util.Locale;
 import java.util.UUID;
 import java.util.regex.Pattern;
 
 import org.json.JSONObject;
 import org.mozilla.gecko.AppConstants.Versions;
+import org.mozilla.gecko.mozglue.generatorannotations.WrapElementForJNI;
 import org.mozilla.gecko.util.ThreadUtils;
 
 import android.content.BroadcastReceiver;
 import android.content.Context;
 import android.content.Intent;
 import android.content.IntentFilter;
 import android.os.Handler;
 import android.os.Looper;
@@ -48,18 +49,21 @@ public final class ANRReporter extends B
     private static final String TRACES_CHARSET = "utf-8";
     private static final String PING_CHARSET = "utf-8";
 
     private static final ANRReporter sInstance = new ANRReporter();
     private static int sRegisteredCount;
     private Handler mHandler;
     private volatile boolean mPendingANR;
 
+    @WrapElementForJNI
     private static native boolean requestNativeStack(boolean unwind);
+    @WrapElementForJNI
     private static native String getNativeStack();
+    @WrapElementForJNI
     private static native void releaseNativeStack();
 
     public static void register(Context context) {
         if (sRegisteredCount++ != 0) {
             // Already registered
             return;
         }
         sInstance.start(context);
--- a/mobile/android/base/Makefile.in
+++ b/mobile/android/base/Makefile.in
@@ -190,17 +190,16 @@ classycle_jar := $(topsrcdir)/mobile/and
 		-jar $(ANDROID_SDK_ROOT)/tools/proguard/lib/proguard.jar \
 		@$(proguard_config_dir)/proguard.cfg \
 		-optimizationpasses $(PROGUARD_PASSES) \
 		-injars $(subst ::,:,$(all_jars_classpath)):bundled-jars-nodebug \
 		-outjars jars-proguarded \
 		-libraryjars $(library_jars)
 
 CLASSES_WITH_JNI= \
-    org.mozilla.gecko.ANRReporter \
     org.mozilla.gecko.GeckoAppShell \
     org.mozilla.gecko.GeckoJavaSampler \
     org.mozilla.gecko.gfx.NativePanZoomController \
     org.mozilla.gecko.util.NativeJSContainer \
     org.mozilla.gecko.util.NativeJSObject \
     $(NULL)
 
 ifdef MOZ_WEBSMS_BACKEND