Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Unified Diff: libadblockplus-android/jni/Utils.h

Issue 29354787: Issue 4442 - Cache class and ctors references in JNI_Load/UnLoad (Closed)
Patch Set: reverted to NewTuple Created Nov. 21, 2016, 8:25 a.m.
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « libadblockplus-android/jni/JniWebRequest.cpp ('k') | libadblockplus-android/jni/Utils.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: libadblockplus-android/jni/Utils.h
diff --git a/libadblockplus-android/jni/Utils.h b/libadblockplus-android/jni/Utils.h
index 1f525b35cdf97148c39311d0efb929e143c4eee2..cd80c3acdf8b7c58bdf223a2b7dbeae07c7f4c64 100644
--- a/libadblockplus-android/jni/Utils.h
+++ b/libadblockplus-android/jni/Utils.h
@@ -31,6 +31,10 @@
#define ABP_JNI_VERSION JNI_VERSION_1_6
+void JniUtils_OnLoad(JavaVM* vm, JNIEnv* env, void* reserved);
+
+void JniUtils_OnUnload(JavaVM* vm, JNIEnv* env, void* reserved);
+
void JniThrowException(JNIEnv* env, const std::string& message);
void JniThrowException(JNIEnv* env, const std::exception& e);
@@ -149,6 +153,10 @@ inline T* JniLongToTypePtr(jlong value)
std::string JniJavaToStdString(JNIEnv* env, jstring str);
+jmethodID JniGetAddToListMethod(JNIEnv* env, jobject list);
+
+void JniAddObjectToList(JNIEnv* env, jobject list, jmethodID addMethod, jobject value);
+
void JniAddObjectToList(JNIEnv* env, jobject list, jobject value);
inline std::string JniGetStringField(JNIEnv* env, jclass clazz, jobject jObj, const char* name)
« no previous file with comments | « libadblockplus-android/jni/JniWebRequest.cpp ('k') | libadblockplus-android/jni/Utils.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld