summaryrefslogtreecommitdiffstats
path: root/runtime/handle_scope.h
diff options
context:
space:
mode:
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.