Index: src/handles.h |
diff --git a/src/handles.h b/src/handles.h |
index 77e5e528da6e2fa04ea7386fe6ff00bd79394401..5b5ed1b564bd57e2648edfb35d74f2832026ecd8 100644 |
--- a/src/handles.h |
+++ b/src/handles.h |
@@ -72,7 +72,8 @@ class MaybeHandle { |
return Handle<T>(location_); |
} |
- INLINE(bool ToHandle(Handle<T>* out)) { |
+ // Convert to a Handle with a type that can be upcasted to. |
+ template <class S> INLINE(bool ToHandle(Handle<S>* out)) { |
if (location_ == NULL) { |
*out = Handle<T>::null(); |
return false; |
@@ -82,6 +83,8 @@ class MaybeHandle { |
} |
} |
+ bool is_null() const { return location_ == NULL; } |
+ |
protected: |
T** location_; |