From db2633ce0358c704f97130a94b582602cb01d14a Mon Sep 17 00:00:00 2001 From: Mathieu Chartier Date: Fri, 16 May 2014 09:59:29 -0700 Subject: Change ObjectLock to take Handle instead of Handle pointer. Change-Id: I9abdcdc5c9c9174634336b9250ab24c6aee434ec --- runtime/handle_scope.h | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'runtime/handle_scope.h') 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 HandleWrapper { +class HandleWrapper : public Handle { public: HandleWrapper(T** obj, const Handle& handle) - : obj_(obj), handle_(handle) { + : Handle(handle), obj_(obj) { } ~HandleWrapper() { - *obj_ = handle_.Get(); + *obj_ = Handle::Get(); } private: T** obj_; - Handle handle_; }; // Scoped handle storage of a fixed size that is usually stack allocated. -- cgit v1.2.3