summaryrefslogtreecommitdiff
path: root/patchoat/patchoat.cc
diff options
context:
space:
mode:
Diffstat (limited to 'patchoat/patchoat.cc')
-rw-r--r--patchoat/patchoat.cc5
1 files changed, 3 insertions, 2 deletions
diff --git a/patchoat/patchoat.cc b/patchoat/patchoat.cc
index dc9d990e29..a6d3903f19 100644
--- a/patchoat/patchoat.cc
+++ b/patchoat/patchoat.cc
@@ -43,6 +43,7 @@
#include "base/unix_file/fd_file.h"
#include "base/unix_file/random_access_file_utils.h"
#include "base/utils.h"
+#include "class_root.h"
#include "elf_file.h"
#include "elf_file_impl.h"
#include "elf_utils.h"
@@ -1053,8 +1054,8 @@ void PatchOat::VisitObject(mirror::Object* object) {
native_visitor);
}
}
- } else if (object->GetClass() == mirror::Method::StaticClass() ||
- object->GetClass() == mirror::Constructor::StaticClass()) {
+ } else if (object->GetClass() == GetClassRoot<mirror::Method>() ||
+ object->GetClass() == GetClassRoot<mirror::Constructor>()) {
// Need to go update the ArtMethod.
auto* dest = down_cast<mirror::Executable*>(copy);
auto* src = down_cast<mirror::Executable*>(object);