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

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

Issue 29524596: Issue 5556 - make C++ implementation of LogSystem manageable only by JsEngine (Closed) Base URL: github.com:abby-sergz/libadblockplus-android.git
Patch Set: rebase Created Aug. 24, 2017, 1:39 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/JniLogSystem.cpp
diff --git a/libadblockplus-android/jni/JniLogSystem.cpp b/libadblockplus-android/jni/JniLogSystem.cpp
index 86dbe4ce708883f764dd2d4f5c25fcd935c74746..7ff0db322559d6571102c2b5ac569a85738173ad 100644
--- a/libadblockplus-android/jni/JniLogSystem.cpp
+++ b/libadblockplus-android/jni/JniLogSystem.cpp
@@ -35,20 +35,6 @@ void JniLogSystem_OnUnload(JavaVM* vm, JNIEnv* env, void* reserved)
}
}
-static jlong JNICALL JniCtor(JNIEnv* env, jclass clazz, jobject callbackObject)
-{
- try
- {
- return JniPtrToLong(new AdblockPlus::LogSystemPtr(new JniLogSystemCallback(env, callbackObject)));
- }
- CATCH_THROW_AND_RETURN(env, 0)
-}
-
-static void JNICALL JniDtor(JNIEnv* env, jclass clazz, jlong ptr)
-{
- delete JniLongToTypePtr<AdblockPlus::LogSystemPtr>(ptr);
-}
-
JniLogSystemCallback::JniLogSystemCallback(JNIEnv* env, jobject callbackObject)
: JniCallbackBase(env, callbackObject), AdblockPlus::LogSystem()
{
@@ -111,14 +97,3 @@ void JniLogSystemCallback::operator()(AdblockPlus::LogSystem::LogLevel logLevel,
CheckAndLogJavaException(*env);
}
}
-
-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_LogSystem_registerNatives(JNIEnv *env, jclass clazz)
-{
- env->RegisterNatives(clazz, methods, sizeof(methods) / sizeof(methods[0]));
-}
« 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