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

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

Issue 29453616: Issue 5286 - Update to use libadblockplus rev. b88d098aeab5 (Closed) Base URL: github.com:abby-sergz/libadblockplus-android.git
Patch Set: Created June 1, 2017, 1:41 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/JniJsEngine.cpp
diff --git a/libadblockplus-android/jni/JniJsEngine.cpp b/libadblockplus-android/jni/JniJsEngine.cpp
index 6f996a2e346a9c181155dc6aa22fc2852b8d9c05..7c08e81ac9ca52647e67df42803cfb15267e08bb 100644
--- a/libadblockplus-android/jni/JniJsEngine.cpp
+++ b/libadblockplus-android/jni/JniJsEngine.cpp
@@ -139,18 +139,6 @@ static void JNICALL JniSetDefaultFileSystem(JNIEnv* env, jclass clazz, jlong ptr
CATCH_AND_THROW(env)
}
-static void JNICALL JniSetDefaultWebRequest(JNIEnv* env, jclass clazz, jlong ptr)
-{
- AdblockPlus::JsEnginePtr& engine = *JniLongToTypePtr<AdblockPlus::JsEnginePtr>(ptr);
-
- try
- {
- AdblockPlus::WebRequestPtr webRequest(new AdblockPlus::DefaultWebRequest());
- engine->SetWebRequest(webRequest);
- }
- CATCH_AND_THROW(env)
-}
-
static void JNICALL JniSetDefaultLogSystem(JNIEnv* env, jclass clazz, jlong ptr)
{
AdblockPlus::JsEnginePtr& engine = *JniLongToTypePtr<AdblockPlus::JsEnginePtr>(ptr);
@@ -183,7 +171,7 @@ static void JNICALL JniSetWebRequest(JNIEnv* env, jclass clazz, jlong ptr, jlong
try
{
- AdblockPlus::WebRequestPtr& webRequest = *JniLongToTypePtr<AdblockPlus::WebRequestPtr>(webRequestPtr);
+ auto& webRequest = *JniLongToTypePtr<AdblockPlus::WebRequestSharedPtr>(webRequestPtr);
engine->SetWebRequest(webRequest);
}
@@ -245,7 +233,6 @@ static JNINativeMethod methods[] =
{ (char*)"setLogSystem", (char*)"(JJ)V", (void*)JniSetLogSystem },
{ (char*)"setDefaultLogSystem", (char*)"(J)V", (void*)JniSetDefaultLogSystem },
{ (char*)"setWebRequest", (char*)"(JJ)V", (void*)JniSetWebRequest },
- { (char*)"setDefaultWebRequest", (char*)"(J)V", (void*)JniSetDefaultWebRequest },
{ (char*)"newValue", (char*)"(JJ)" TYP("JsValue"), (void*)JniNewLongValue },
{ (char*)"newValue", (char*)"(JZ)" TYP("JsValue"), (void*)JniNewBooleanValue },

Powered by Google App Engine
This is Rietveld