summaryrefslogtreecommitdiffstats
path: root/runtime/handle_scope.h
diff options
context:
space:
mode:
authorMathieu Chartier <mathieuc@google.com>2014-05-16 09:59:29 -0700
committerMathieu Chartier <mathieuc@google.com>2014-05-16 10:36:37 -0700
commitdb2633ce0358c704f97130a94b582602cb01d14a (patch)
treeab941b728fe4343eb9872abc85755640bf059800 /runtime/handle_scope.h
parentf59c6dda4928cfb05d32a56fd161e3f86a9ca560 (diff)
downloadart-db2633ce0358c704f97130a94b582602cb01d14a.tar.gz
art-db2633ce0358c704f97130a94b582602cb01d14a.tar.bz2
art-db2633ce0358c704f97130a94b582602cb01d14a.zip
Change ObjectLock to take Handle instead of Handle pointer.
Change-Id: I9abdcdc5c9c9174634336b9250ab24c6aee434ec
Diffstat (limited to 'runtime/handle_scope.h')
-rw-r--r--runtime/handle_scope.h7
1 files changed, 3 insertions, 4 deletions
diff --git a/runtime/handle_scope.h b/runtime/handle_scope.h
index 27c1bdcfd4..f2e059d6bc 100644
--- a/runtime/handle_scope.h
+++ b/runtime/handle_scope.h
@@ -144,19 +144,18 @@ class HandleScope {
// A wrapper which wraps around Object** and restores the pointer in the destructor.
// TODO: Add more functionality.
template<class T>
-class HandleWrapper {
+class HandleWrapper : public Handle<T> {
public:
HandleWrapper(T** obj, const Handle<T>& handle)
- : obj_(obj), handle_(handle) {
+ : Handle<T>(handle), obj_(obj) {
}
~HandleWrapper() {
- *obj_ = handle_.Get();
+ *obj_ = Handle<T>::Get();
}
private:
T** obj_;
- Handle<T> handle_;
};
// Scoped handle storage of a fixed size that is usually stack allocated.