Index: jni/JniCallbacks.h |
diff --git a/jni/JniCallbacks.h b/jni/JniCallbacks.h |
index 38e520bc53732fe3ca0bb68a093426be5f0556f6..198451b490d85e6f7b9cdb52b361dbc37f335288 100644 |
--- a/jni/JniCallbacks.h |
+++ b/jni/JniCallbacks.h |
@@ -42,8 +42,8 @@ public: |
private: |
JavaVM* javaVM; |
- JniGlobalReference<jobject>::Ptr callbackObject; |
- JniGlobalReference<jclass>::Ptr exceptionLoggerClass; |
+ const JniGlobalReference<jobject>::Ptr callbackObject; |
+ const JniGlobalReference<jclass>::Ptr exceptionLoggerClass; |
}; |
class JniEventCallback : public JniCallbackBase |
@@ -65,6 +65,9 @@ class JniFilterChangeCallback : public JniCallbackBase |
public: |
JniFilterChangeCallback(JNIEnv* env, jobject callbackObject); |
void Callback(const std::string& arg, const AdblockPlus::JsValuePtr jsValue); |
+ |
+private: |
+ const JniGlobalReference<jclass>::Ptr jsValueClass; |
}; |
class JniLogSystemCallback : public JniCallbackBase, public AdblockPlus::LogSystem |
@@ -74,7 +77,7 @@ public: |
void operator()(AdblockPlus::LogSystem::LogLevel logLevel, const std::string& message, const std::string& source); |
private: |
- JniGlobalReference<jclass>::Ptr logLevelClass; |
+ const JniGlobalReference<jclass>::Ptr logLevelClass; |
}; |
class JniWebRequest : public JniCallbackBase, public AdblockPlus::WebRequest |
@@ -86,8 +89,8 @@ public: |
private: |
jobject NewTuple(JNIEnv* env, const std::string& a, const std::string& b) const; |
- JniGlobalReference<jclass>::Ptr tupleClass; |
- JniGlobalReference<jclass>::Ptr serverResponseClass; |
+ const JniGlobalReference<jclass>::Ptr tupleClass; |
+ const JniGlobalReference<jclass>::Ptr serverResponseClass; |
}; |
#endif /* JNICALLBACKS_H */ |