summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Almaz Mingaleev <mingaleev@google.com> 2025-02-25 07:10:33 -0800
committer Almaz Mingaleev <mingaleev@google.com> 2025-02-26 00:54:32 -0800
commite31ace291919b25146e4d267b233addcd9c65932 (patch)
treed1b4df98285c3ad727c11477b8cc286385e7d68a
parent9aad1508e7907e4503888df63d3659fe27b8244f (diff)
Revert^2 "Minimal hiddenapibypass breakage demo."
38f8f04fdc1fda3ab73639ea7409b186a78204b1 Change-Id: Ia61a2e3d0628b0aeda884eafa1bcb7f36f5f63f4
-rw-r--r--runtime/class_linker_test.cc2
-rw-r--r--runtime/mirror/method_handle_impl.h3
2 files changed, 5 insertions, 0 deletions
diff --git a/runtime/class_linker_test.cc b/runtime/class_linker_test.cc
index 8ae7687433..1176bb133e 100644
--- a/runtime/class_linker_test.cc
+++ b/runtime/class_linker_test.cc
@@ -786,6 +786,8 @@ struct MethodHandleOffsets : public CheckOffsets<mirror::MethodHandle> {
struct MethodHandleImplOffsets : public CheckOffsets<mirror::MethodHandleImpl> {
MethodHandleImplOffsets() : CheckOffsets<mirror::MethodHandleImpl>(
false, "Ljava/lang/invoke/MethodHandleImpl;") {
+ addOffset(OFFSETOF_MEMBER(mirror::MethodHandleImpl, field_), "field");
+ addOffset(OFFSETOF_MEMBER(mirror::MethodHandleImpl, target_), "target");
addOffset(OFFSETOF_MEMBER(mirror::MethodHandleImpl, target_class_or_info_),
"targetClassOrMethodHandleInfo");
}
diff --git a/runtime/mirror/method_handle_impl.h b/runtime/mirror/method_handle_impl.h
index 427a20013e..b5d1d9ad25 100644
--- a/runtime/mirror/method_handle_impl.h
+++ b/runtime/mirror/method_handle_impl.h
@@ -22,6 +22,7 @@
#include "base/macros.h"
#include "class.h"
#include "method_type.h"
+#include "mirror/field.h"
#include "obj_ptr.h"
#include "object.h"
@@ -128,7 +129,9 @@ class MANAGED MethodHandleImpl : public MethodHandle {
REQUIRES_SHARED(Locks::mutator_lock_) REQUIRES(!Roles::uninterruptible_);
private:
+ HeapReference<mirror::Field> field_;
HeapReference<mirror::Object> target_class_or_info_; // Unused by the runtime.
+ uint64_t target_;
friend struct art::MethodHandleImplOffsets; // for verifying offset information
DISALLOW_IMPLICIT_CONSTRUCTORS(MethodHandleImpl);