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

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

Issue 29361445: Issue 4399 - Add WebView inheritor with ad blocking (Closed)
Patch Set: renamings, updated README Created Dec. 19, 2016, 3:04 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
Index: libadblockplus-android/jni/JniSubscription.cpp
diff --git a/libadblockplus-android/jni/JniSubscription.cpp b/libadblockplus-android/jni/JniSubscription.cpp
index 4217fb0655e39a121cdcde6ecd1b2484ea7935ab..c20ebacf902554da8c691e2af32669ce4258524b 100644
--- a/libadblockplus-android/jni/JniSubscription.cpp
+++ b/libadblockplus-android/jni/JniSubscription.cpp
@@ -28,7 +28,9 @@ static jlong JNICALL JniCtor(JNIEnv* env, jclass clazz, jlong jsValue)
{
try
{
- return JniPtrToLong(new AdblockPlus::SubscriptionPtr(new AdblockPlus::Subscription(JniGetJsValuePtr(jsValue))));
+ AdblockPlus::JsValue *jsValuePtr = JniGetJsValue(jsValue);
+ return JniPtrToLong(new AdblockPlus::SubscriptionPtr(new AdblockPlus::Subscription(
+ std::move(*jsValuePtr))));
}
CATCH_THROW_AND_RETURN(env, 0)
}

Powered by Google App Engine
This is Rietveld