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

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

Issue 29422558: Issue 5167 - Update to use libadblockplus revision dca8df9af1a7 (Closed)
Patch Set: optimizations by serge, using newer libadblockplus-binaries Created May 5, 2017, 11:33 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/JniFilterChangeCallback.cpp
diff --git a/libadblockplus-android/jni/JniFilterChangeCallback.cpp b/libadblockplus-android/jni/JniFilterChangeCallback.cpp
index 77c578562c68687898c55544cfb3c5e15fc59906..44dcdcc2425e8e867269de719a5e597f8f219081 100644
--- a/libadblockplus-android/jni/JniFilterChangeCallback.cpp
+++ b/libadblockplus-android/jni/JniFilterChangeCallback.cpp
@@ -37,8 +37,7 @@ JniFilterChangeCallback::JniFilterChangeCallback(JNIEnv* env,
{
}
-void JniFilterChangeCallback::Callback(const std::string& arg,
- const AdblockPlus::JsValuePtr jsValue)
+void JniFilterChangeCallback::Callback(const std::string& arg, AdblockPlus::JsValue&& jsValue)
{
JNIEnvAcquire env(GetJavaVM());
@@ -50,7 +49,7 @@ void JniFilterChangeCallback::Callback(const std::string& arg,
if (method)
{
JniLocalReference<jstring> jArg(*env, env->NewStringUTF(arg.c_str()));
- JniLocalReference<jobject> jJsValue(*env, NewJniJsValue(*env, jsValue, GetJsValueClass()));
+ JniLocalReference<jobject> jJsValue(*env, NewJniJsValue(*env, std::move(jsValue), GetJsValueClass()));
env->CallVoidMethod(GetCallbackObject(), method, *jArg, *jJsValue);
}

Powered by Google App Engine
This is Rietveld