diff options
author | Ian Rogers <irogers@google.com> | 2014-07-22 08:01:10 +0000 |
---|---|---|
committer | Gerrit Code Review <noreply-gerritcodereview@google.com> | 2014-07-17 23:22:21 +0000 |
commit | ebb6b5c90857f390db5a4f840bbe67b3a59a22d8 (patch) | |
tree | 69f693b7195fd71be0a46b9034efa13d8d51d637 /runtime | |
parent | 9d9fec65366ea4996b17141c97ff94416239b63e (diff) | |
parent | ecd4d9adc1e2b2ac1367de9a2dc1ca15ebf4310c (diff) | |
download | art-ebb6b5c90857f390db5a4f840bbe67b3a59a22d8.zip art-ebb6b5c90857f390db5a4f840bbe67b3a59a22d8.tar.gz art-ebb6b5c90857f390db5a4f840bbe67b3a59a22d8.tar.bz2 |
Merge "Avoid marking erroneous classes as erroneous twice."
Diffstat (limited to 'runtime')
-rw-r--r-- | runtime/class_linker.cc | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/runtime/class_linker.cc b/runtime/class_linker.cc index 6c5679e..3364491 100644 --- a/runtime/class_linker.cc +++ b/runtime/class_linker.cc @@ -1668,7 +1668,9 @@ mirror::Class* ClassLinker::DefineClass(const char* descriptor, if (self->IsExceptionPending()) { // An exception occured during load, set status to erroneous while holding klass' lock in case // notification is necessary. - klass->SetStatus(mirror::Class::kStatusError, self); + if (!klass->IsErroneous()) { + klass->SetStatus(mirror::Class::kStatusError, self); + } return nullptr; } klass->SetClinitThreadId(self->GetTid()); @@ -1685,7 +1687,9 @@ mirror::Class* ClassLinker::DefineClass(const char* descriptor, CHECK(!klass->IsLoaded()); if (!LoadSuperAndInterfaces(klass, dex_file)) { // Loading failed. - klass->SetStatus(mirror::Class::kStatusError, self); + if (!klass->IsErroneous()) { + klass->SetStatus(mirror::Class::kStatusError, self); + } return nullptr; } CHECK(klass->IsLoaded()); @@ -1697,7 +1701,9 @@ mirror::Class* ClassLinker::DefineClass(const char* descriptor, mirror::Class* new_class = nullptr; if (!LinkClass(self, descriptor, klass, interfaces, &new_class)) { // Linking failed. - klass->SetStatus(mirror::Class::kStatusError, self); + if (!klass->IsErroneous()) { + klass->SetStatus(mirror::Class::kStatusError, self); + } return nullptr; } CHECK(new_class != nullptr) << descriptor; |