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

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

Issue 29453616: Issue 5286 - Update to use libadblockplus rev. b88d098aeab5 (Closed) Base URL: github.com:abby-sergz/libadblockplus-android.git
Patch Set: add missed dependencies Created June 2, 2017, 1:45 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/JniWebRequest.cpp
diff --git a/libadblockplus-android/jni/JniWebRequest.cpp b/libadblockplus-android/jni/JniWebRequest.cpp
index 4d34b4c55e3dcbe25a46d5edebf2aa1637b81160..57b66e9d78a761893f0aa6edb7dbe8296d94be80 100644
--- a/libadblockplus-android/jni/JniWebRequest.cpp
+++ b/libadblockplus-android/jni/JniWebRequest.cpp
@@ -48,14 +48,14 @@ static jlong JNICALL JniCtor(JNIEnv* env, jclass clazz, jobject callbackObject)
{
try
{
- return JniPtrToLong(new AdblockPlus::WebRequestPtr(new JniWebRequest(env, callbackObject)));
+ return JniPtrToLong(new AdblockPlus::WebRequestSharedPtr(std::make_shared<JniWebRequest>(env, callbackObject)));
}
CATCH_THROW_AND_RETURN(env, 0)
}
static void JNICALL JniDtor(JNIEnv* env, jclass clazz, jlong ptr)
{
- delete JniLongToTypePtr<AdblockPlus::WebRequestPtr>(ptr);
+ delete JniLongToTypePtr<AdblockPlus::WebRequestSharedPtr>(ptr);
}
JniWebRequest::JniWebRequest(JNIEnv* env, jobject callbackObject)
@@ -75,7 +75,7 @@ AdblockPlus::ServerResponse JniWebRequest::GET(const std::string& url,
"(Ljava/lang/String;Ljava/util/List;)" TYP("ServerResponse"));
AdblockPlus::ServerResponse sResponse;
- sResponse.status = AdblockPlus::WebRequest::NS_ERROR_FAILURE;
+ sResponse.status = AdblockPlus::IWebRequest::NS_ERROR_FAILURE;
if (method)
{
« no previous file with comments | « libadblockplus-android/jni/JniJsEngine.cpp ('k') | libadblockplus-android/src/org/adblockplus/libadblockplus/JsEngine.java » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld