Index: include/v8.h |
diff --git a/include/v8.h b/include/v8.h |
index 5526705c84269523ab7eafd144ab26dd12aa594e..b2203ec9ca1afacba24ce873ecfb619bdc2ed82a 100644 |
--- a/include/v8.h |
+++ b/include/v8.h |
@@ -1469,6 +1469,8 @@ class V8EXPORT Value : public Data { |
bool Equals(Handle<Value> that) const; |
bool StrictEquals(Handle<Value> that) const; |
+ template <class T> V8_INLINE(static Value* Cast(T* value)); |
+ |
private: |
V8_INLINE(bool QuickIsUndefined() const); |
V8_INLINE(bool QuickIsNull() const); |
@@ -5987,6 +5989,11 @@ bool Value::QuickIsString() const { |
} |
+template <class T> Value* Value::Cast(T* value) { |
+ return static_cast<Value*>(value); |
+} |
+ |
+ |
Symbol* Symbol::Cast(v8::Value* value) { |
#ifdef V8_ENABLE_CHECKS |
CheckCast(value); |