Index: libadblockplus-android/jni/JniJsValue.cpp |
diff --git a/libadblockplus-android/jni/JniJsValue.cpp b/libadblockplus-android/jni/JniJsValue.cpp |
index d39645fe400cc06a51ca55a4725f54599ab2fb05..92c4847c6d20e656a1fe140ca439ef1140a26cbe 100644 |
--- a/libadblockplus-android/jni/JniJsValue.cpp |
+++ b/libadblockplus-android/jni/JniJsValue.cpp |
@@ -168,7 +168,8 @@ static void JNICALL JniDtor(JNIEnv* env, jclass clazz, jlong ptr) |
jobject NewJniJsValue(JNIEnv* env, AdblockPlus::JsValue&& jsValue, jclass jsValueClassArg) |
{ |
sergei
2017/05/12 15:38:07
I thought about adding some static_assert like bel
|
- return env->NewObject(jsValueClass->Get(), jsValueCtor, new AdblockPlus::JsValue(std::move(jsValue))); |
+ auto pJsValue = reinterpret_cast<uintptr_t>(new AdblockPlus::JsValue(std::move(jsValue))); |
+ return env->NewObject(jsValueClass->Get(), jsValueCtor, static_cast<jlong>(pJsValue)); |
} |
AdblockPlus::JsValue* JniGetJsValuePtr(jlong ptr) |