summaryrefslogtreecommitdiff
path: root/runtime/mirror/class_ext.cc
diff options
context:
space:
mode:
author Alex Light <allight@google.com> 2019-12-02 18:54:13 +0000
committer Treehugger Robot <treehugger-gerrit@google.com> 2019-12-02 20:35:34 +0000
commitbc19b7559e887310664a4c86ad3eb3b47749b087 (patch)
tree820961050c6904f89d9bfe67f8b936f2a5ec9d9c /runtime/mirror/class_ext.cc
parent0a19e212e56fc6fe2809b58072ddcf4acfdc568d (diff)
Revert^2 "Make opaque-jni-ids:swapable more efficient"
This reverts commit 42c52f53b3c85b5e3c984bca8eaec2e03893dd2e. This un-reverts commit 4e7dd70e3ee7a25089bed791df8865966cb4b837. We were missing some null-checks that caused a null-pointer dereference to occur if one tried to get a jmethodID for an obsolete method when we start with index-ids. Reason for revert: Fixes issue causing failure in art-jit config. Test: Manual Test: count-fields.py Bug: 134162467 Change-Id: Ie36c7a4edb70f96655b3b85e5f5eaa6bf47f5cc7
Diffstat (limited to 'runtime/mirror/class_ext.cc')
-rw-r--r--runtime/mirror/class_ext.cc7
1 files changed, 7 insertions, 0 deletions
diff --git a/runtime/mirror/class_ext.cc b/runtime/mirror/class_ext.cc
index 27dcea83c6..ba1ae5f260 100644
--- a/runtime/mirror/class_ext.cc
+++ b/runtime/mirror/class_ext.cc
@@ -51,6 +51,13 @@ void ClassExt::SetObsoleteArrays(ObjPtr<PointerArray> methods,
SetFieldObject<false>(obsolete_methods_off, methods);
}
+void ClassExt::SetIdsArraysForClassExtExtData(ObjPtr<Object> marker) {
+ CHECK(!marker.IsNull());
+ SetFieldObject<false>(OFFSET_OF_OBJECT_MEMBER(ClassExt, instance_jfield_ids_), marker);
+ SetFieldObject<false>(OFFSET_OF_OBJECT_MEMBER(ClassExt, static_jfield_ids_), marker);
+ SetFieldObject<false>(OFFSET_OF_OBJECT_MEMBER(ClassExt, jmethod_ids_), marker);
+}
+
// We really need to be careful how we update this. If we ever in the future make it so that
// these arrays are written into without all threads being suspended we have a race condition! This
// race could cause obsolete methods to be missed.