mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 863777 - Add native stack JNI method definitions; r=kats
This commit is contained in:
parent
972894c901
commit
7ac143ee85
@ -62,6 +62,10 @@ public final class ANRReporter extends BroadcastReceiver
|
||||
private Handler mHandler;
|
||||
private volatile boolean mPendingANR;
|
||||
|
||||
private static native boolean requestNativeStack();
|
||||
private static native String getNativeStack();
|
||||
private static native void releaseNativeStack();
|
||||
|
||||
public static void register(Context context) {
|
||||
if (sRegisteredCount++ != 0) {
|
||||
// Already registered
|
||||
|
@ -1218,6 +1218,7 @@ CLASSES_WITH_JNI= \
|
||||
org.mozilla.gecko.GeckoAppShell \
|
||||
org.mozilla.gecko.GeckoJavaSampler \
|
||||
org.mozilla.gecko.gfx.NativePanZoomController \
|
||||
org.mozilla.gecko.ANRReporter \
|
||||
$(NULL)
|
||||
|
||||
ifdef MOZ_WEBSMS_BACKEND
|
||||
|
@ -569,3 +569,60 @@ Java_org_mozilla_gecko_gfx_NativePanZoomController_getOverScrollMode(JNIEnv * ar
|
||||
xul_dlsym("Java_org_mozilla_gecko_gfx_NativePanZoomController_getOverScrollMode", &f_Java_org_mozilla_gecko_gfx_NativePanZoomController_getOverScrollMode);
|
||||
#endif
|
||||
|
||||
#ifdef JNI_STUBS
|
||||
|
||||
typedef jboolean (*Java_org_mozilla_gecko_ANRReporter_requestNativeStack_t)(JNIEnv *, jclass);
|
||||
static Java_org_mozilla_gecko_ANRReporter_requestNativeStack_t f_Java_org_mozilla_gecko_ANRReporter_requestNativeStack;
|
||||
extern "C" NS_EXPORT jboolean JNICALL
|
||||
Java_org_mozilla_gecko_ANRReporter_requestNativeStack(JNIEnv * arg0, jclass arg1) {
|
||||
if (!f_Java_org_mozilla_gecko_ANRReporter_requestNativeStack) {
|
||||
arg0->ThrowNew(arg0->FindClass("java/lang/UnsupportedOperationException"),
|
||||
"JNI Function called before it was loaded");
|
||||
return false;
|
||||
}
|
||||
return f_Java_org_mozilla_gecko_ANRReporter_requestNativeStack(arg0, arg1);
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef JNI_BINDINGS
|
||||
xul_dlsym("Java_org_mozilla_gecko_ANRReporter_requestNativeStack", &f_Java_org_mozilla_gecko_ANRReporter_requestNativeStack);
|
||||
#endif
|
||||
|
||||
#ifdef JNI_STUBS
|
||||
|
||||
typedef jstring (*Java_org_mozilla_gecko_ANRReporter_getNativeStack_t)(JNIEnv *, jclass);
|
||||
static Java_org_mozilla_gecko_ANRReporter_getNativeStack_t f_Java_org_mozilla_gecko_ANRReporter_getNativeStack;
|
||||
extern "C" NS_EXPORT jstring JNICALL
|
||||
Java_org_mozilla_gecko_ANRReporter_getNativeStack(JNIEnv * arg0, jclass arg1) {
|
||||
if (!f_Java_org_mozilla_gecko_ANRReporter_getNativeStack) {
|
||||
arg0->ThrowNew(arg0->FindClass("java/lang/UnsupportedOperationException"),
|
||||
"JNI Function called before it was loaded");
|
||||
return NULL;
|
||||
}
|
||||
return f_Java_org_mozilla_gecko_ANRReporter_getNativeStack(arg0, arg1);
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef JNI_BINDINGS
|
||||
xul_dlsym("Java_org_mozilla_gecko_ANRReporter_getNativeStack", &f_Java_org_mozilla_gecko_ANRReporter_getNativeStack);
|
||||
#endif
|
||||
|
||||
#ifdef JNI_STUBS
|
||||
|
||||
typedef void (*Java_org_mozilla_gecko_ANRReporter_releaseNativeStack_t)(JNIEnv *, jclass);
|
||||
static Java_org_mozilla_gecko_ANRReporter_releaseNativeStack_t f_Java_org_mozilla_gecko_ANRReporter_releaseNativeStack;
|
||||
extern "C" NS_EXPORT void JNICALL
|
||||
Java_org_mozilla_gecko_ANRReporter_releaseNativeStack(JNIEnv * arg0, jclass arg1) {
|
||||
if (!f_Java_org_mozilla_gecko_ANRReporter_releaseNativeStack) {
|
||||
arg0->ThrowNew(arg0->FindClass("java/lang/UnsupportedOperationException"),
|
||||
"JNI Function called before it was loaded");
|
||||
return ;
|
||||
}
|
||||
f_Java_org_mozilla_gecko_ANRReporter_releaseNativeStack(arg0, arg1);
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef JNI_BINDINGS
|
||||
xul_dlsym("Java_org_mozilla_gecko_ANRReporter_releaseNativeStack", &f_Java_org_mozilla_gecko_ANRReporter_releaseNativeStack);
|
||||
#endif
|
||||
|
||||
|
@ -976,4 +976,22 @@ Java_org_mozilla_gecko_gfx_NativePanZoomController_getOverScrollMode(JNIEnv* env
|
||||
return 0;
|
||||
}
|
||||
|
||||
NS_EXPORT jboolean JNICALL
|
||||
Java_org_mozilla_gecko_ANRReporter_requestNativeStack(JNIEnv*, jclass)
|
||||
{
|
||||
return JNI_FALSE;
|
||||
}
|
||||
|
||||
NS_EXPORT jstring JNICALL
|
||||
Java_org_mozilla_gecko_ANRReporter_getNativeStack(JNIEnv* jenv, jclass)
|
||||
{
|
||||
return NULL;
|
||||
}
|
||||
|
||||
NS_EXPORT void JNICALL
|
||||
Java_org_mozilla_gecko_ANRReporter_releaseNativeStack(JNIEnv* jenv, jclass)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user