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

Unified Diff: libadblockplus-android/jni/JniFilter.cpp

Issue 29347012: Issue 4188 - Update libadblockplus-android to use the latest libadblockplus (Closed)
Patch Set: Changes in libadblockplus-android repo Created June 24, 2016, 2:38 p.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 | « no previous file | libadblockplus-android/jni/JniSubscription.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: libadblockplus-android/jni/JniFilter.cpp
===================================================================
--- a/libadblockplus-android/jni/JniFilter.cpp
+++ b/libadblockplus-android/jni/JniFilter.cpp
@@ -23,17 +23,19 @@
{
return JniLongToTypePtr<AdblockPlus::FilterPtr>(ptr)->get();
}
static jlong JNICALL JniCtor(JNIEnv* env, jclass clazz, jlong jsValue)
{
try
{
- return JniPtrToLong(new AdblockPlus::FilterPtr(new AdblockPlus::Filter(JniGetJsValuePtr(jsValue))));
+ AdblockPlus::JsValue *jsValuePtr = JniGetJsValue(jsValue);
+ return JniPtrToLong(new AdblockPlus::FilterPtr(
+ new AdblockPlus::Filter(std::move(*jsValuePtr))));
sergei 2016/08/30 09:45:57 What about using of return JniPtrToLong(new Adbloc
sergei 2016/08/30 10:07:31 Even better without affecting address arithmetic r
anton 2016/08/30 10:57:29 Done.
}
CATCH_THROW_AND_RETURN(env, 0)
}
static jobject JNICALL JniGetType(JNIEnv* env, jclass clazz, jlong ptr)
{
AdblockPlus::Filter::Type type;
try
« no previous file with comments | « no previous file | libadblockplus-android/jni/JniSubscription.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld