summaryrefslogtreecommitdiff
path: root/runtime/mirror/class_ext.cc
diff options
context:
space:
mode:
author Alex Light <allight@google.com> 2017-03-16 13:13:31 -0700
committer Alex Light <allight@google.com> 2017-03-16 14:23:46 -0700
commit4f2e957b07c8b6e48bbd7593bb64f3c5214fa489 (patch)
treeefcfcaaa1efdc567449c406e7107da2e94c127c2 /runtime/mirror/class_ext.cc
parented883a11b8cd7f3712bd30fca1e2b0fb641bff63 (diff)
Ensure the GC visits Obsolete Methods
We were previously not visiting obsolete methods during GCs. This could lead to the use of stale pointers. Bug: 36335999 Test: ./test/testrunner/testrunner.py --host --interp-ac --gcstress -j40 Change-Id: I2b5c7c75b29f9037204a860501fcdb78104b5e7a
Diffstat (limited to 'runtime/mirror/class_ext.cc')
-rw-r--r--runtime/mirror/class_ext.cc8
1 files changed, 6 insertions, 2 deletions
diff --git a/runtime/mirror/class_ext.cc b/runtime/mirror/class_ext.cc
index 7270079a8f..5dc3aca094 100644
--- a/runtime/mirror/class_ext.cc
+++ b/runtime/mirror/class_ext.cc
@@ -14,7 +14,7 @@
* limitations under the License.
*/
-#include "class_ext.h"
+#include "class_ext-inl.h"
#include "art_method-inl.h"
#include "base/casts.h"
@@ -24,7 +24,6 @@
#include "gc/accounting/card_table-inl.h"
#include "object-inl.h"
#include "object_array.h"
-#include "object_array-inl.h"
#include "stack_trace_element.h"
#include "utils.h"
#include "well_known_classes.h"
@@ -34,6 +33,11 @@ namespace mirror {
GcRoot<Class> ClassExt::dalvik_system_ClassExt_;
+uint32_t ClassExt::ClassSize(PointerSize pointer_size) {
+ uint32_t vtable_entries = Object::kVTableLength;
+ return Class::ComputeClassSize(true, vtable_entries, 0, 0, 0, 0, 0, pointer_size);
+}
+
void ClassExt::SetObsoleteArrays(ObjPtr<PointerArray> methods,
ObjPtr<ObjectArray<DexCache>> dex_caches) {
DCHECK_EQ(GetLockOwnerThreadId(), Thread::Current()->GetThreadId())