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

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

Issue 29345369: Issue 4081 - Fix failing MockWebRequestTest test for libadblockplus-android (Closed)
Patch Set: with Utils' JniJavaToStdString Created June 21, 2016, 9:04 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
Index: libadblockplus-android/jni/Utils.h
===================================================================
--- a/libadblockplus-android/jni/Utils.h
+++ b/libadblockplus-android/jni/Utils.h
@@ -166,16 +166,21 @@
return (int32_t)env->GetIntField(jObj, env->GetFieldID(clazz, name, "I"));
}
inline int64_t JniGetLongField(JNIEnv* env, jclass clazz, jobject jObj, const char* name)
{
return (int64_t)env->GetLongField(jObj, env->GetFieldID(clazz, name, "J"));
}
+inline jobjectArray JniGetStringArrayField(JNIEnv* env, jclass clazz, jobject jObj, const char* name)
+{
+ return (jobjectArray)env->GetObjectField(jObj, env->GetFieldID(clazz, name, "[Ljava/lang/String;"));
+}
+
jobject NewJniArrayList(JNIEnv* env);
jobject NewJniFilter(JNIEnv* env, const AdblockPlus::FilterPtr& filter);
jobject NewJniSubscription(JNIEnv* env,
const AdblockPlus::SubscriptionPtr& subscription);
jobject NewJniNotification(JNIEnv* env,
« libadblockplus-android/jni/JniWebRequest.cpp ('K') | « libadblockplus-android/jni/JniWebRequest.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld