MCPcopy Create free account
hub / github.com/NativeScript/android / JNI_OnLoad

Function JNI_OnLoad

test-app/runtime/src/main/cpp/com_tns_Runtime.cpp:57–78  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

55}
56
57JNIEXPORT jint JNICALL JNI_OnLoad(JavaVM* vm, void* reserved) {
58 try {
59 Runtime::Init(vm, reserved);
60
61 JNIEnv* env = nullptr;
62 if (vm->GetEnv(reinterpret_cast<void**>(&env), JNI_VERSION_1_6) == JNI_OK && env != nullptr) {
63 RegisterOptimizedNatives(env);
64 }
65 } catch (NativeScriptException& e) {
66 e.ReThrowToJava();
67 } catch (std::exception e) {
68 stringstream ss;
69 ss << "Error: c++ exception: " << e.what() << endl;
70 NativeScriptException nsEx(ss.str());
71 nsEx.ReThrowToJava();
72 } catch (...) {
73 NativeScriptException nsEx(std::string("Error: c++ exception!"));
74 nsEx.ReThrowToJava();
75 }
76
77 return JNI_VERSION_1_6;
78}
79
80static void setManualInstrumentationModeFast_impl(JNIEnv* env, jclass clazz, jstring mode) {
81 try {

Callers

nothing calls this directly

Calls 3

RegisterOptimizedNativesFunction · 0.85
ReThrowToJavaMethod · 0.80
whatMethod · 0.45

Tested by

no test coverage detected