[Libreoffice-commits] online.git: android/lib
Ashod Nakashian (via logerrit)
logerrit at kemper.freedesktop.org
Mon Feb 17 18:41:47 UTC 2020
android/lib/src/main/cpp/androidapp.cpp | 3 +++
1 file changed, 3 insertions(+)
New commits:
commit 972691021f0b356b46bef656af92cac70d507b89
Author: Ashod Nakashian <ashod.nakashian at collabora.co.uk>
AuthorDate: Mon Feb 17 11:47:46 2020 -0500
Commit: Michael Meeks <michael.meeks at collabora.com>
CommitDate: Mon Feb 17 19:41:29 2020 +0100
android: DeleteLocalRef on NewStringUTF
Change-Id: I23a4278cc7e0b069a9a53efad404c88527a782f8
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/88871
Tested-by: Michael Meeks <michael.meeks at collabora.com>
Reviewed-by: Michael Meeks <michael.meeks at collabora.com>
diff --git a/android/lib/src/main/cpp/androidapp.cpp b/android/lib/src/main/cpp/androidapp.cpp
index 9c084c77b..defe7b628 100644
--- a/android/lib/src/main/cpp/androidapp.cpp
+++ b/android/lib/src/main/cpp/androidapp.cpp
@@ -151,6 +151,7 @@ static void send2JS(const JNIThreadContext &jctx, jclass loActivityClz, jobject
jstring jstr = env->NewStringUTF(js.c_str());
jmethodID callFakeWebsocket = env->GetMethodID(loActivityClz, "callFakeWebsocketOnMessage", "(Ljava/lang/String;)V");
env->CallVoidMethod(loActivityObj, callFakeWebsocket, jstr);
+ env->DeleteLocalRef(jstr);
if (env->ExceptionCheck())
env->ExceptionDescribe();
@@ -417,6 +418,7 @@ Java_org_libreoffice_androidlib_LOActivity_getClipboardContent(JNIEnv *env, jobj
jstring mimeType = tojstringAndFree(env, outMimeTypes[i]);
// clipboardEntry.mime= mimeType
env->SetObjectField(clipboardEntry, fieldId_LokClipboardEntry_Mime, mimeType);
+ env->DeleteLocalRef(mimeType);
size_t aByteArraySize = outSizes[i];
jbyteArray aByteArray = env->NewByteArray(aByteArraySize);
@@ -454,6 +456,7 @@ Java_org_libreoffice_androidlib_LOActivity_getClipboardContent(JNIEnv *env, jobj
jstring mimeType = tojstringAndFree(env, outMimeTypes[i]);
// clipboardEntry.mime= mimeType
env->SetObjectField(clipboardEntry, fieldId_LokClipboardEntry_Mime, mimeType);
+ env->DeleteLocalRef(mimeType);
size_t aByteArraySize = outSizes[i];
jbyteArray aByteArray = env->NewByteArray(aByteArraySize);
More information about the Libreoffice-commits
mailing list