From 9db302862dc4afe9aff9ebb25815798ad732cc8d Mon Sep 17 00:00:00 2001 From: Jim Chen Date: Wed, 29 Jul 2015 15:11:15 -0400 Subject: [PATCH] Bug 1182641 - Update autogenerated code; r=me --- mozglue/android/jni-stubs.inc | 57 ---------------------- widget/android/GeneratedJNINatives.h | 22 +++++++++ widget/android/GeneratedJNIWrappers.cpp | 11 +++++ widget/android/GeneratedJNIWrappers.h | 64 +++++++++++++++++++++++++ 4 files changed, 97 insertions(+), 57 deletions(-) diff --git a/mozglue/android/jni-stubs.inc b/mozglue/android/jni-stubs.inc index f5107ad6d4a..a9941b6fcae 100644 --- a/mozglue/android/jni-stubs.inc +++ b/mozglue/android/jni-stubs.inc @@ -1,63 +1,6 @@ /* WARNING - This file is autogenerated by mobile/android/base/jni-generator.py. Do not edit manually! */ #ifdef JNI_STUBS -typedef jboolean (*Java_org_mozilla_gecko_ANRReporter_requestNativeStack_t)(JNIEnv *, jclass, jboolean); -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, jboolean arg2) { - 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, arg2); -} -#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 nullptr; - } - 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 - -#ifdef JNI_STUBS - typedef void (*Java_org_mozilla_gecko_GeckoAppShell_registerJavaUiThread_t)(JNIEnv *, jclass); static Java_org_mozilla_gecko_GeckoAppShell_registerJavaUiThread_t f_Java_org_mozilla_gecko_GeckoAppShell_registerJavaUiThread; extern "C" NS_EXPORT void JNICALL diff --git a/widget/android/GeneratedJNINatives.h b/widget/android/GeneratedJNINatives.h index 484000c689f..4cb1f4b88e4 100644 --- a/widget/android/GeneratedJNINatives.h +++ b/widget/android/GeneratedJNINatives.h @@ -13,6 +13,28 @@ namespace mozilla { namespace widget { +template +class ANRReporter::Natives : public mozilla::jni::NativeImpl +{ +public: + static constexpr JNINativeMethod methods[] = { + + mozilla::jni::MakeNativeMethod( + mozilla::jni::NativeStub + ::template Wrap<&Impl::GetNativeStack>), + + mozilla::jni::MakeNativeMethod( + mozilla::jni::NativeStub + ::template Wrap<&Impl::ReleaseNativeStack>), + + mozilla::jni::MakeNativeMethod( + mozilla::jni::NativeStub + ::template Wrap<&Impl::RequestNativeStack>) + }; +}; + +template +constexpr JNINativeMethod ANRReporter::Natives::methods[]; } /* widget */ } /* mozilla */ diff --git a/widget/android/GeneratedJNIWrappers.cpp b/widget/android/GeneratedJNIWrappers.cpp index e8681c87135..acac4ef2013 100644 --- a/widget/android/GeneratedJNIWrappers.cpp +++ b/widget/android/GeneratedJNIWrappers.cpp @@ -10,6 +10,17 @@ namespace mozilla { namespace widget { +constexpr char ANRReporter::name[]; + +constexpr char ANRReporter::GetNativeStack_t::name[]; +constexpr char ANRReporter::GetNativeStack_t::signature[]; + +constexpr char ANRReporter::ReleaseNativeStack_t::name[]; +constexpr char ANRReporter::ReleaseNativeStack_t::signature[]; + +constexpr char ANRReporter::RequestNativeStack_t::name[]; +constexpr char ANRReporter::RequestNativeStack_t::signature[]; + constexpr char DownloadsIntegration::name[]; constexpr char DownloadsIntegration::ScanMedia_t::name[]; diff --git a/widget/android/GeneratedJNIWrappers.h b/widget/android/GeneratedJNIWrappers.h index c0ee1a020ee..3c527ae2cc2 100644 --- a/widget/android/GeneratedJNIWrappers.h +++ b/widget/android/GeneratedJNIWrappers.h @@ -12,6 +12,70 @@ namespace mozilla { namespace widget { +class ANRReporter : public mozilla::jni::Class +{ +public: + typedef mozilla::jni::Ref Ref; + typedef mozilla::jni::LocalRef LocalRef; + typedef mozilla::jni::GlobalRef GlobalRef; + typedef const mozilla::jni::Param& Param; + + static constexpr char name[] = + "org/mozilla/gecko/ANRReporter"; + +protected: + ANRReporter(jobject instance) : Class(instance) {} + +public: + struct GetNativeStack_t { + typedef ANRReporter Owner; + typedef mozilla::jni::String::LocalRef ReturnType; + typedef mozilla::jni::String::Param SetterType; + typedef mozilla::jni::Args<> Args; + static constexpr char name[] = "getNativeStack"; + static constexpr char signature[] = + "()Ljava/lang/String;"; + static const bool isStatic = true; + static const bool isMultithreaded = false; + static const mozilla::jni::ExceptionMode exceptionMode = + mozilla::jni::ExceptionMode::ABORT; + }; + +public: + struct ReleaseNativeStack_t { + typedef ANRReporter Owner; + typedef void ReturnType; + typedef void SetterType; + typedef mozilla::jni::Args<> Args; + static constexpr char name[] = "releaseNativeStack"; + static constexpr char signature[] = + "()V"; + static const bool isStatic = true; + static const bool isMultithreaded = false; + static const mozilla::jni::ExceptionMode exceptionMode = + mozilla::jni::ExceptionMode::ABORT; + }; + +public: + struct RequestNativeStack_t { + typedef ANRReporter Owner; + typedef bool ReturnType; + typedef bool SetterType; + typedef mozilla::jni::Args< + bool> Args; + static constexpr char name[] = "requestNativeStack"; + static constexpr char signature[] = + "(Z)Z"; + static const bool isStatic = true; + static const bool isMultithreaded = false; + static const mozilla::jni::ExceptionMode exceptionMode = + mozilla::jni::ExceptionMode::ABORT; + }; + +public: + template class Natives; +}; + class DownloadsIntegration : public mozilla::jni::Class { public: