Index: libadblockplus-android/jni/JniWebRequest.cpp |
diff --git a/libadblockplus-android/jni/JniWebRequest.cpp b/libadblockplus-android/jni/JniWebRequest.cpp |
index 20f9dbff5eb7f037f8006b49e91fb336227de7a2..e2d61be62f92c3797f106a77fe63c534586fb63c 100644 |
--- a/libadblockplus-android/jni/JniWebRequest.cpp |
+++ b/libadblockplus-android/jni/JniWebRequest.cpp |
@@ -44,22 +44,8 @@ void JniWebRequest_OnUnload(JavaVM* vm, JNIEnv* env, void* reserved) |
} |
} |
-static jlong JNICALL JniCtor(JNIEnv* env, jclass clazz, jobject callbackObject) |
-{ |
- try |
- { |
- 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::WebRequestSharedPtr>(ptr); |
-} |
- |
JniWebRequest::JniWebRequest(JNIEnv* env, jobject callbackObject) |
- : JniCallbackBase(env, callbackObject), AdblockPlus::WebRequest() |
+ : JniCallbackBase(env, callbackObject) |
{ |
} |
@@ -146,15 +132,4 @@ jobject JniWebRequest::NewTuple(JNIEnv* env, const std::string& a, |
JniLocalReference<jstring> strB(env, env->NewStringUTF(b.c_str())); |
return env->NewObject(headerEntryClass->Get(), factory, *strA, *strB); |
-} |
- |
-static JNINativeMethod methods[] = |
-{ |
- { (char*)"ctor", (char*)"(Ljava/lang/Object;)J", (void*)JniCtor }, |
- { (char*)"dtor", (char*)"(J)V", (void*)JniDtor } |
-}; |
- |
-extern "C" JNIEXPORT void JNICALL Java_org_adblockplus_libadblockplus_WebRequest_registerNatives(JNIEnv *env, jclass clazz) |
-{ |
- env->RegisterNatives(clazz, methods, sizeof(methods) / sizeof(methods[0])); |
-} |
+} |