diff options
author | Mathieu Chartier <mathieuc@google.com> | 2014-05-07 15:43:14 -0700 |
---|---|---|
committer | Mathieu Chartier <mathieuc@google.com> | 2014-05-13 14:45:54 -0700 |
commit | eb8167a4f4d27fce0530f6724ab8032610cd146b (patch) | |
tree | bcfeaf13ad78f2dd68466bbd0e20c71944f7e854 /runtime/reflection.cc | |
parent | 6fb66a2bc4e1c0b7931101153e58714991237af7 (diff) | |
download | art-eb8167a4f4d27fce0530f6724ab8032610cd146b.tar.gz art-eb8167a4f4d27fce0530f6724ab8032610cd146b.tar.bz2 art-eb8167a4f4d27fce0530f6724ab8032610cd146b.zip |
Add Handle/HandleScope and delete SirtRef.
Delete SirtRef and replaced it with Handle. Handles are value types
which wrap around StackReference*.
Renamed StackIndirectReferenceTable to HandleScope.
Added a scoped handle wrapper which wraps around an Object** and
restores it in its destructor.
Renamed Handle::get -> Get.
Bug: 8473721
Change-Id: Idbfebd4f35af629f0f43931b7c5184b334822c7a
Diffstat (limited to 'runtime/reflection.cc')
-rw-r--r-- | runtime/reflection.cc | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/runtime/reflection.cc b/runtime/reflection.cc index f0ba0032dd..98310e68f4 100644 --- a/runtime/reflection.cc +++ b/runtime/reflection.cc @@ -467,11 +467,12 @@ jobject InvokeMethod(const ScopedObjectAccess& soa, jobject javaMethod, mirror::Class* declaring_class = m->GetDeclaringClass(); if (UNLIKELY(!declaring_class->IsInitialized())) { - SirtRef<mirror::Class> sirt_c(soa.Self(), declaring_class); - if (!Runtime::Current()->GetClassLinker()->EnsureInitialized(sirt_c, true, true)) { + StackHandleScope<1> hs(soa.Self()); + Handle<mirror::Class> h_class(hs.NewHandle(declaring_class)); + if (!Runtime::Current()->GetClassLinker()->EnsureInitialized(h_class, true, true)) { return nullptr; } - declaring_class = sirt_c.get(); + declaring_class = h_class.Get(); } mirror::Object* receiver = nullptr; |