Revert^4 "Walk internal ArtField/ArtMethod pointers"

Several of the new tests make use of the invoke-custom opcode. This
opcode is not supported by dexter/slicer causing the tests to fail.

This reverts commit c34eab45161c51bf63e548e44645cbcc59d01268.

Reason for revert: Added tests to redefine-stress known failures
Test: ./test.py --host --redefine-stress
Bug: 134162467

Change-Id: Ic1b375a0cb1e44d0252c17115af92c269fb8efc5
diff --git a/openjdkjvmti/events.cc b/openjdkjvmti/events.cc
index 77acd56..3f205eb 100644
--- a/openjdkjvmti/events.cc
+++ b/openjdkjvmti/events.cc
@@ -64,6 +64,8 @@
 #include "mirror/object-inl.h"
 #include "monitor-inl.h"
 #include "nativehelper/scoped_local_ref.h"
+#include "reflective_handle.h"
+#include "reflective_handle_scope-inl.h"
 #include "runtime.h"
 #include "scoped_thread_state_change-inl.h"
 #include "scoped_thread_state_change.h"
@@ -800,11 +802,14 @@
   // Call-back for when we read from a field.
   void FieldRead(art::Thread* self,
                  art::Handle<art::mirror::Object> this_object,
-                 art::ArtMethod* method,
+                 art::ArtMethod* method_p,
                  uint32_t dex_pc,
-                 art::ArtField* field)
+                 art::ArtField* field_p)
       REQUIRES_SHARED(art::Locks::mutator_lock_) override {
     if (event_handler_->IsEventEnabledAnywhere(ArtJvmtiEvent::kFieldAccess)) {
+      art::StackReflectiveHandleScope<1, 1> rhs(self);
+      art::ReflectiveHandle<art::ArtField> field(rhs.NewHandle(field_p));
+      art::ReflectiveHandle<art::ArtMethod> method(rhs.NewHandle(method_p));
       art::JNIEnvExt* jnienv = self->GetJniEnv();
       // DCHECK(!self->IsExceptionPending());
       ScopedLocalRef<jobject> this_ref(jnienv, AddLocalRef<jobject>(jnienv, this_object.Get()));
@@ -824,13 +829,16 @@
 
   void FieldWritten(art::Thread* self,
                     art::Handle<art::mirror::Object> this_object,
-                    art::ArtMethod* method,
+                    art::ArtMethod* method_p,
                     uint32_t dex_pc,
-                    art::ArtField* field,
+                    art::ArtField* field_p,
                     art::Handle<art::mirror::Object> new_val)
       REQUIRES_SHARED(art::Locks::mutator_lock_) override {
     if (event_handler_->IsEventEnabledAnywhere(ArtJvmtiEvent::kFieldModification)) {
       art::JNIEnvExt* jnienv = self->GetJniEnv();
+      art::StackReflectiveHandleScope<1, 1> rhs(self);
+      art::ReflectiveHandle<art::ArtField> field(rhs.NewHandle(field_p));
+      art::ReflectiveHandle<art::ArtMethod> method(rhs.NewHandle(method_p));
       // DCHECK(!self->IsExceptionPending());
       ScopedLocalRef<jobject> this_ref(jnienv, AddLocalRef<jobject>(jnienv, this_object.Get()));
       ScopedLocalRef<jobject> fklass(jnienv,
@@ -856,13 +864,16 @@
   // Call-back for when we write into a field.
   void FieldWritten(art::Thread* self,
                     art::Handle<art::mirror::Object> this_object,
-                    art::ArtMethod* method,
+                    art::ArtMethod* method_p,
                     uint32_t dex_pc,
-                    art::ArtField* field,
+                    art::ArtField* field_p,
                     const art::JValue& field_value)
       REQUIRES_SHARED(art::Locks::mutator_lock_) override {
     if (event_handler_->IsEventEnabledAnywhere(ArtJvmtiEvent::kFieldModification)) {
       art::JNIEnvExt* jnienv = self->GetJniEnv();
+      art::StackReflectiveHandleScope<1, 1> rhs(self);
+      art::ReflectiveHandle<art::ArtField> field(rhs.NewHandle(field_p));
+      art::ReflectiveHandle<art::ArtMethod> method(rhs.NewHandle(method_p));
       DCHECK(!self->IsExceptionPending());
       ScopedLocalRef<jobject> this_ref(jnienv, AddLocalRef<jobject>(jnienv, this_object.Get()));
       ScopedLocalRef<jobject> fklass(jnienv,