Index: include/v8.h |
diff --git a/include/v8.h b/include/v8.h |
index 76186064524dd005dcef6e119615e564b602988a..765bdae07e6eded5a5e0682694974bfa0d9d6791 100644 |
--- a/include/v8.h |
+++ b/include/v8.h |
@@ -2007,7 +2007,10 @@ class V8_EXPORT Primitive : public Value { }; |
class V8_EXPORT Boolean : public Primitive { |
public: |
bool Value() const; |
+ V8_INLINE static Boolean* Cast(v8::Value* obj); |
V8_INLINE static Handle<Boolean> New(Isolate* isolate, bool value); |
+ private: |
+ static void CheckCast(v8::Value* obj); |
}; |
@@ -7287,6 +7290,14 @@ Local<Uint32> Value::ToUint32() const { |
Local<Int32> Value::ToInt32() const { return ToInt32(Isolate::GetCurrent()); } |
+Boolean* Boolean::Cast(v8::Value* value) { |
+#ifdef V8_ENABLE_CHECKS |
+ CheckCast(value); |
+#endif |
+ return static_cast<Boolean*>(value); |
+} |
+ |
+ |
Name* Name::Cast(v8::Value* value) { |
#ifdef V8_ENABLE_CHECKS |
CheckCast(value); |