Commit 3a726628 authored by Christian Strømme's avatar Christian Strømme Committed by Alex Blasche
Browse files

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: default avatarFrank Meerkoetter <frank.meerkoetter@basyskom.com>
Reviewed-by: default avatarAlex Blasche <alexander.blasche@theqtcompany.com>
parent 36d6eb72
No related merge requests found
Showing with 293 additions and 180 deletions
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment