Index: include/v8.h |
diff --git a/include/v8.h b/include/v8.h |
index f8519db9bc630e9e28c625713bfc43211c18481c..f70f45769bb5ca58ff6d178b7129f92448301e8c 100644 |
--- a/include/v8.h |
+++ b/include/v8.h |
@@ -1703,14 +1703,24 @@ class V8_EXPORT Value : public Data { |
*/ |
bool IsDataView() const; |
- Local<Boolean> ToBoolean() const; |
- Local<Number> ToNumber() const; |
- Local<String> ToString() const; |
- Local<String> ToDetailString() const; |
- Local<Object> ToObject() const; |
- Local<Integer> ToInteger() const; |
- Local<Uint32> ToUint32() const; |
- Local<Int32> ToInt32() const; |
+ Local<Boolean> ToBoolean(Isolate* isolate) const; |
+ Local<Number> ToNumber(Isolate* isolate) const; |
+ Local<String> ToString(Isolate* isolate) const; |
+ Local<String> ToDetailString(Isolate* isolate) const; |
+ Local<Object> ToObject(Isolate* isolate) const; |
+ Local<Integer> ToInteger(Isolate* isolate) const; |
+ Local<Uint32> ToUint32(Isolate* isolate) const; |
+ Local<Int32> ToInt32(Isolate* isolate) const; |
+ |
+ // TODO(dcarney): deprecate all these. |
+ inline Local<Boolean> ToBoolean() const; |
+ inline Local<Number> ToNumber() const; |
+ inline Local<String> ToString() const; |
+ inline Local<String> ToDetailString() const; |
+ inline Local<Object> ToObject() const; |
+ inline Local<Integer> ToInteger() const; |
+ inline Local<Uint32> ToUint32() const; |
+ inline Local<Int32> ToInt32() const; |
/** |
* Attempts to convert a string to an array index. |
@@ -6638,6 +6648,44 @@ template <class T> Value* Value::Cast(T* value) { |
} |
+Local<Boolean> Value::ToBoolean() const { |
+ return ToBoolean(Isolate::GetCurrent()); |
+} |
+ |
+ |
+Local<Number> Value::ToNumber() const { |
+ return ToNumber(Isolate::GetCurrent()); |
+} |
+ |
+ |
+Local<String> Value::ToString() const { |
+ return ToString(Isolate::GetCurrent()); |
+} |
+ |
+ |
+Local<String> Value::ToDetailString() const { |
+ return ToDetailString(Isolate::GetCurrent()); |
+} |
+ |
+ |
+Local<Object> Value::ToObject() const { |
+ return ToObject(Isolate::GetCurrent()); |
+} |
+ |
+ |
+Local<Integer> Value::ToInteger() const { |
+ return ToInteger(Isolate::GetCurrent()); |
+} |
+ |
+ |
+Local<Uint32> Value::ToUint32() const { |
+ return ToUint32(Isolate::GetCurrent()); |
+} |
+ |
+ |
+Local<Int32> Value::ToInt32() const { return ToInt32(Isolate::GetCurrent()); } |
+ |
+ |
Name* Name::Cast(v8::Value* value) { |
#ifdef V8_ENABLE_CHECKS |
CheckCast(value); |