diff options
author | Andreas Gampe <agampe@google.com> | 2015-04-22 18:10:36 -0700 |
---|---|---|
committer | Andreas Gampe <agampe@google.com> | 2015-04-22 18:10:36 -0700 |
commit | bfdcdc1e2c0af34aeaf7b5b4d499975e0c3157be (patch) | |
tree | 17143f52b438284477fa6e3ac8fe74b0d82a5744 /runtime/class_linker.h | |
parent | 8e58d76eb30a50e38c46bd6277186116937ba396 (diff) | |
download | art-bfdcdc1e2c0af34aeaf7b5b4d499975e0c3157be.zip art-bfdcdc1e2c0af34aeaf7b5b4d499975e0c3157be.tar.gz art-bfdcdc1e2c0af34aeaf7b5b4d499975e0c3157be.tar.bz2 |
ART: Fix re-throwing failures of non-convention errors
While it is convention that Throwable subclasses should have a
constructor with a String argument, that is not rigorously enforced.
So if a static initializer throws an error that omits that
constructor, we must not provide a message when trying to throw
again.
Bug: 20495321
Bug: 20497840
Change-Id: Ia4334fa24223750f90a8f2732f1eb1e738575e8d
Diffstat (limited to 'runtime/class_linker.h')
-rw-r--r-- | runtime/class_linker.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/runtime/class_linker.h b/runtime/class_linker.h index 8e27413..1bd9f0a 100644 --- a/runtime/class_linker.h +++ b/runtime/class_linker.h @@ -657,6 +657,12 @@ class ClassLinker { // Return the quick generic JNI stub for testing. const void* GetRuntimeQuickGenericJniStub() const; + // Throw the class initialization failure recorded when first trying to initialize the given + // class. + // Note: Currently we only store the descriptor, so we cannot throw the exact throwable, only + // a recreation with a custom string. + void ThrowEarlierClassFailure(mirror::Class* c) SHARED_LOCKS_REQUIRED(Locks::mutator_lock_); + std::vector<const DexFile*> boot_class_path_; std::vector<std::unique_ptr<const DexFile>> opened_dex_files_; |