@@ -1123,6 +1123,10 @@ class V8_EXPORT PrimitiveArray {
11231123 public:
11241124 static Local<PrimitiveArray> New (Isolate* isolate, int length);
11251125 int Length () const ;
1126+ V8_DEPRECATED (" Use Isolate* version" ,
1127+ void Set (int index, Local<Primitive> item));
1128+ V8_DEPRECATED (" Use Isolate* version" ,
1129+ Local<Primitive> Get (int index));
11261130 void Set (Isolate* isolate, int index, Local<Primitive> item);
11271131 Local<Primitive> Get (Isolate* isolate, int index);
11281132};
@@ -1829,6 +1833,8 @@ class V8_EXPORT StackTrace {
18291833 /* *
18301834 * Returns a StackFrame at a particular index.
18311835 */
1836+ V8_DEPRECATED (" Use Isolate version" ,
1837+ Local<StackFrame> GetFrame (uint32_t index) const );
18321838 Local<StackFrame> GetFrame (Isolate* isolate, uint32_t index) const ;
18331839
18341840 /* *
@@ -2524,18 +2530,25 @@ class V8_EXPORT Value : public Data {
25242530 Local<Context> context) const ;
25252531 V8_WARN_UNUSED_RESULT MaybeLocal<Int32> ToInt32 (Local<Context> context) const ;
25262532
2527- V8_DEPRECATE_SOON (" Use maybe version" ,
2528- Local<Boolean> ToBoolean (Isolate* isolate) const );
2529- V8_DEPRECATE_SOON (" Use maybe version" ,
2530- Local<Number> ToNumber (Isolate* isolate) const );
2531- V8_DEPRECATE_SOON (" Use maybe version" ,
2532- Local<String> ToString (Isolate* isolate) const );
2533- V8_DEPRECATE_SOON (" Use maybe version" ,
2534- Local<Object> ToObject (Isolate* isolate) const );
2535- V8_DEPRECATE_SOON (" Use maybe version" ,
2536- Local<Integer> ToInteger (Isolate* isolate) const );
2537- V8_DEPRECATE_SOON (" Use maybe version" ,
2538- Local<Int32> ToInt32 (Isolate* isolate) const );
2533+ V8_DEPRECATED (" Use maybe version" ,
2534+ Local<Boolean> ToBoolean (Isolate* isolate) const );
2535+ V8_DEPRECATED (" Use maybe version" ,
2536+ Local<Number> ToNumber (Isolate* isolate) const );
2537+ V8_DEPRECATED (" Use maybe version" ,
2538+ Local<String> ToString (Isolate* isolate) const );
2539+ V8_DEPRECATED (" Use maybe version" ,
2540+ Local<Object> ToObject (Isolate* isolate) const );
2541+ V8_DEPRECATED (" Use maybe version" ,
2542+ Local<Integer> ToInteger (Isolate* isolate) const );
2543+ V8_DEPRECATED (" Use maybe version" ,
2544+ Local<Int32> ToInt32 (Isolate* isolate) const );
2545+
2546+ inline V8_DEPRECATED (" Use maybe version" ,
2547+ Local<Boolean> ToBoolean () const );
2548+ inline V8_DEPRECATED (" Use maybe version" , Local<String> ToString () const );
2549+ inline V8_DEPRECATED (" Use maybe version" , Local<Object> ToObject () const );
2550+ inline V8_DEPRECATED (" Use maybe version" ,
2551+ Local<Integer> ToInteger () const );
25392552
25402553 /* *
25412554 * Attempts to convert a string to an array index.
@@ -2552,7 +2565,14 @@ class V8_EXPORT Value : public Data {
25522565 Local<Context> context) const ;
25532566 V8_WARN_UNUSED_RESULT Maybe<int32_t > Int32Value (Local<Context> context) const ;
25542567
2568+ V8_DEPRECATED (" Use maybe version" , bool BooleanValue () const );
2569+ V8_DEPRECATED (" Use maybe version" , double NumberValue () const );
2570+ V8_DEPRECATED (" Use maybe version" , int64_t IntegerValue () const );
2571+ V8_DEPRECATED (" Use maybe version" , uint32_t Uint32Value () const );
2572+ V8_DEPRECATED (" Use maybe version" , int32_t Int32Value () const );
2573+
25552574 /* * JS == */
2575+ V8_DEPRECATED (" Use maybe version" , bool Equals (Local<Value> that) const );
25562576 V8_WARN_UNUSED_RESULT Maybe<bool > Equals (Local<Context> context,
25572577 Local<Value> that) const ;
25582578 bool StrictEquals (Local<Value> that) const ;
@@ -2659,6 +2679,8 @@ class V8_EXPORT String : public Name {
26592679 * Returns the number of bytes in the UTF-8 encoded
26602680 * representation of this string.
26612681 */
2682+ V8_DEPRECATED (" Use Isolate version instead" , int Utf8Length () const );
2683+
26622684 int Utf8Length (Isolate* isolate) const ;
26632685
26642686 /* *
@@ -2715,12 +2737,23 @@ class V8_EXPORT String : public Name {
27152737 // 16-bit character codes.
27162738 int Write (Isolate* isolate, uint16_t * buffer, int start = 0 , int length = -1 ,
27172739 int options = NO_OPTIONS) const ;
2740+ V8_DEPRECATED (" Use Isolate* version" ,
2741+ int Write (uint16_t * buffer, int start = 0 , int length = -1 ,
2742+ int options = NO_OPTIONS) const );
27182743 // One byte characters.
27192744 int WriteOneByte (Isolate* isolate, uint8_t * buffer, int start = 0 ,
27202745 int length = -1 , int options = NO_OPTIONS) const ;
2746+ V8_DEPRECATED (" Use Isolate* version" ,
2747+ int WriteOneByte (uint8_t * buffer, int start = 0 ,
2748+ int length = -1 , int options = NO_OPTIONS)
2749+ const );
27212750 // UTF-8 encoded characters.
27222751 int WriteUtf8 (Isolate* isolate, char * buffer, int length = -1 ,
27232752 int * nchars_ref = NULL , int options = NO_OPTIONS) const ;
2753+ V8_DEPRECATED (" Use Isolate* version" ,
2754+ int WriteUtf8 (char * buffer, int length = -1 ,
2755+ int * nchars_ref = NULL ,
2756+ int options = NO_OPTIONS) const );
27242757
27252758 /* *
27262759 * A zero length string.
@@ -2884,6 +2917,9 @@ class V8_EXPORT String : public Name {
28842917 */
28852918 static Local<String> Concat (Isolate* isolate, Local<String> left,
28862919 Local<String> right);
2920+ static V8_DEPRECATED (" Use Isolate* version" ,
2921+ Local<String> Concat (Local<String> left,
2922+ Local<String> right));
28872923
28882924 /* *
28892925 * Creates a new external string using the data defined in the given
@@ -2952,6 +2988,8 @@ class V8_EXPORT String : public Name {
29522988 */
29532989 class V8_EXPORT Utf8Value {
29542990 public:
2991+ V8_DEPRECATED (" Use Isolate version" ,
2992+ explicit Utf8Value (Local<v8::Value> obj));
29552993 Utf8Value (Isolate* isolate, Local<v8::Value> obj);
29562994 ~Utf8Value ();
29572995 char * operator *() { return str_; }
@@ -2975,6 +3013,7 @@ class V8_EXPORT String : public Name {
29753013 */
29763014 class V8_EXPORT Value {
29773015 public:
3016+ V8_DEPRECATED (" Use Isolate version" , explicit Value (Local<v8::Value> obj));
29783017 Value (Isolate* isolate, Local<v8::Value> obj);
29793018 ~Value ();
29803019 uint16_t * operator *() { return str_; }
@@ -5217,6 +5256,8 @@ class V8_EXPORT BooleanObject : public Object {
52175256class V8_EXPORT StringObject : public Object {
52185257 public:
52195258 static Local<Value> New (Isolate* isolate, Local<String> value);
5259+ V8_DEPRECATED (" Use Isolate* version" ,
5260+ static Local<Value> New (Local<String> value));
52205261
52215262 Local<String> ValueOf () const ;
52225263
@@ -10216,6 +10257,30 @@ template <class T> Value* Value::Cast(T* value) {
1021610257}
1021710258
1021810259
10260+ Local<Boolean> Value::ToBoolean () const {
10261+ return ToBoolean (Isolate::GetCurrent ()->GetCurrentContext ())
10262+ .FromMaybe (Local<Boolean>());
10263+ }
10264+
10265+
10266+ Local<String> Value::ToString () const {
10267+ return ToString (Isolate::GetCurrent ()->GetCurrentContext ())
10268+ .FromMaybe (Local<String>());
10269+ }
10270+
10271+
10272+ Local<Object> Value::ToObject () const {
10273+ return ToObject (Isolate::GetCurrent ()->GetCurrentContext ())
10274+ .FromMaybe (Local<Object>());
10275+ }
10276+
10277+
10278+ Local<Integer> Value::ToInteger () const {
10279+ return ToInteger (Isolate::GetCurrent ()->GetCurrentContext ())
10280+ .FromMaybe (Local<Integer>());
10281+ }
10282+
10283+
1021910284Boolean* Boolean::Cast (v8::Value* value) {
1022010285#ifdef V8_ENABLE_CHECKS
1022110286 CheckCast (value);
0 commit comments