Remove static GcRoot<>s from Field, Method, Constructor.
Test: m test-art-host-gtest
Test: testrunner.py --host --optimizing
Bug: 31113334
Change-Id: I648b88339995761fb81180286ef48a42bbd2f83d
diff --git a/patchoat/patchoat.cc b/patchoat/patchoat.cc
index dc9d990..a6d3903 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 @@
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);