diff options
author | Mathieu Chartier <mathieuc@google.com> | 2014-02-13 18:02:13 -0800 |
---|---|---|
committer | Mathieu Chartier <mathieuc@google.com> | 2014-02-18 10:45:12 -0800 |
commit | 815873ecc312b1d231acce71e1a16f42cdaf09f2 (patch) | |
tree | 18ba2fa951775e60b240271bfe975e6e2cfc654c /runtime/mirror/throwable.cc | |
parent | 2befd09cf4fe89a18a655f3e1dd310831bfa769f (diff) | |
download | art-815873ecc312b1d231acce71e1a16f42cdaf09f2.tar.gz art-815873ecc312b1d231acce71e1a16f42cdaf09f2.tar.bz2 art-815873ecc312b1d231acce71e1a16f42cdaf09f2.zip |
Change root visitor to use Object**.
Simplifies code and improves the performance of root visiting since
we usually don't need to check to see if the object moved.
Change-Id: Iba998f5a15ae1fa1b53ca5226dd2168a411196cf
Diffstat (limited to 'runtime/mirror/throwable.cc')
-rw-r--r-- | runtime/mirror/throwable.cc | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/runtime/mirror/throwable.cc b/runtime/mirror/throwable.cc index fef7d36837..4c53993a6e 100644 --- a/runtime/mirror/throwable.cc +++ b/runtime/mirror/throwable.cc @@ -99,8 +99,7 @@ void Throwable::ResetClass() { void Throwable::VisitRoots(RootCallback* callback, void* arg) { if (java_lang_Throwable_ != nullptr) { - java_lang_Throwable_ = down_cast<Class*>(callback(java_lang_Throwable_, arg, 0, - kRootStickyClass)); + callback(reinterpret_cast<mirror::Object**>(&java_lang_Throwable_), arg, 0, kRootStickyClass); } } |