Index: src/api.h |
diff --git a/src/api.h b/src/api.h |
index ee0765e78c3ef987048b6a284dd6bcbc0b8e29ef..fa8682bf572079558491ee7cba95e44e55ea73b3 100644 |
--- a/src/api.h |
+++ b/src/api.h |
@@ -319,6 +319,18 @@ inline v8::Local<T> ToApiHandle( |
} |
+template <class T> |
+inline bool ToLocal(v8::internal::MaybeHandle<v8::internal::Object> maybe, |
+ Local<T>* local) { |
+ v8::internal::Handle<v8::internal::Object> handle; |
+ if (maybe.ToHandle(&handle)) { |
+ *local = Utils::Convert<v8::internal::Object, T>(handle); |
+ return true; |
+ } |
+ return false; |
+} |
+ |
+ |
// Implementations of ToLocal |
#define MAKE_TO_LOCAL(Name, From, To) \ |