summaryrefslogtreecommitdiff
path: root/runtime/entrypoints/entrypoint_utils-inl.h
diff options
context:
space:
mode:
Diffstat (limited to 'runtime/entrypoints/entrypoint_utils-inl.h')
-rw-r--r--runtime/entrypoints/entrypoint_utils-inl.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/runtime/entrypoints/entrypoint_utils-inl.h b/runtime/entrypoints/entrypoint_utils-inl.h
index 255607937e..fe12a7c379 100644
--- a/runtime/entrypoints/entrypoint_utils-inl.h
+++ b/runtime/entrypoints/entrypoint_utils-inl.h
@@ -39,6 +39,7 @@
#include "mirror/object-inl.h"
#include "mirror/throwable.h"
#include "nth_caller_visitor.h"
+#include "reflective_handle_scope-inl.h"
#include "runtime.h"
#include "stack_map.h"
#include "thread.h"
@@ -381,9 +382,11 @@ inline ArtField* FindFieldFromCode(uint32_t field_idx,
return resolved_field;
} else {
StackHandleScope<1> hs(self);
+ StackArtFieldHandleScope<1> rhs(self);
+ ReflectiveHandle<ArtField> resolved_field_handle(rhs.NewHandle(resolved_field));
if (LIKELY(class_linker->EnsureInitialized(self, hs.NewHandle(fields_class), true, true))) {
// Otherwise let's ensure the class is initialized before resolving the field.
- return resolved_field;
+ return resolved_field_handle.Get();
}
DCHECK(self->IsExceptionPending()); // Throw exception and unwind
return nullptr; // Failure.