summaryrefslogtreecommitdiffstats
path: root/src/corelib/kernel/qjni_p.h
diff options
context:
space:
mode:
authorChristian Strømme <christian.stromme@theqtcompany.com>2015-05-06 18:15:03 +0200
committerAlex Blasche <alexander.blasche@theqtcompany.com>2015-05-08 13:04:13 +0000
commit3a726628f13c8f46b447cf0844eb8a5b740a1993 (patch)
treeedfe5a04d3d5d9fd8226f7a0553bc5588c5391c1 /src/corelib/kernel/qjni_p.h
parent36d6eb721e7d5997ade75e289d4088dc48678d0d (diff)
Android: Store and use the class names as key when caching.
Previously the jclass handle was part of the key used for caching the class' methods and fields. Using the jclass handle is not ideal, but it meant that we could easily create a key when the only identifier we had was the jobject or jclass handle. However, in Android 5.1, the re-use of handles seems to be more aggressive and therefore increasing the chance of a collision in the cache look-up. This change removes caching for all calls where we don't know the class name, as that is the only thing that guarantees that we create unique keys for each class. The consequence of this is that only calls that provide a class name will benefit from the internal caching. Task-number: QTBUG-45748 Change-Id: I0039d04e7c068debc9e3b3983632c45dc8e52309 Reviewed-by: Frank Meerkoetter <frank.meerkoetter@basyskom.com> Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
Diffstat (limited to 'src/corelib/kernel/qjni_p.h')
-rw-r--r--src/corelib/kernel/qjni_p.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/corelib/kernel/qjni_p.h b/src/corelib/kernel/qjni_p.h
index fb1982dc74..a62e9ee056 100644
--- a/src/corelib/kernel/qjni_p.h
+++ b/src/corelib/kernel/qjni_p.h
@@ -74,6 +74,7 @@ public:
jobject m_jobject;
jclass m_jclass;
bool m_own_jclass;
+ QByteArray m_className;
};
class Q_CORE_EXPORT QJNIObjectPrivate