Revert^2 "Support clinit for app image during compilation"
Add some spot fixes for app image class initialization and re-enable
test 660 features.
Bug: 70735003
Test: test-art-host
This reverts commit abadf024efdc632f663d7fb503cd277b3f65fca2.
Change-Id: Id16fd3ada3eb1bd57ea60c3cdc4a0cf9835950d7
diff --git a/runtime/class_linker.cc b/runtime/class_linker.cc
index c06e5e8..2bbcbb7 100644
--- a/runtime/class_linker.cc
+++ b/runtime/class_linker.cc
@@ -3152,7 +3152,11 @@
// Interface object should get the right size here. Regular class will
// figure out the right size later and be replaced with one of the right
// size when the class becomes resolved.
- klass.Assign(AllocClass(self, SizeOfClassWithoutEmbeddedTables(dex_file, dex_class_def)));
+ if (CanAllocClass()) {
+ klass.Assign(AllocClass(self, SizeOfClassWithoutEmbeddedTables(dex_file, dex_class_def)));
+ } else {
+ return nullptr;
+ }
}
if (UNLIKELY(klass == nullptr)) {
self->AssertPendingOOMException();