@@ -1123,6 +1123,10 @@ class V8_EXPORT PrimitiveArray {
1123
1123
public:
1124
1124
static Local<PrimitiveArray> New (Isolate* isolate, int length);
1125
1125
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));
1126
1130
void Set (Isolate* isolate, int index, Local<Primitive> item);
1127
1131
Local<Primitive> Get (Isolate* isolate, int index);
1128
1132
};
@@ -1829,6 +1833,8 @@ class V8_EXPORT StackTrace {
1829
1833
/* *
1830
1834
* Returns a StackFrame at a particular index.
1831
1835
*/
1836
+ V8_DEPRECATED (" Use Isolate version" ,
1837
+ Local<StackFrame> GetFrame (uint32_t index) const );
1832
1838
Local<StackFrame> GetFrame (Isolate* isolate, uint32_t index) const ;
1833
1839
1834
1840
/* *
@@ -2524,18 +2530,25 @@ class V8_EXPORT Value : public Data {
2524
2530
Local<Context> context) const ;
2525
2531
V8_WARN_UNUSED_RESULT MaybeLocal<Int32> ToInt32 (Local<Context> context) const ;
2526
2532
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 );
2539
2552
2540
2553
/* *
2541
2554
* Attempts to convert a string to an array index.
@@ -2552,7 +2565,14 @@ class V8_EXPORT Value : public Data {
2552
2565
Local<Context> context) const ;
2553
2566
V8_WARN_UNUSED_RESULT Maybe<int32_t > Int32Value (Local<Context> context) const ;
2554
2567
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
+
2555
2574
/* * JS == */
2575
+ V8_DEPRECATED (" Use maybe version" , bool Equals (Local<Value> that) const );
2556
2576
V8_WARN_UNUSED_RESULT Maybe<bool > Equals (Local<Context> context,
2557
2577
Local<Value> that) const ;
2558
2578
bool StrictEquals (Local<Value> that) const ;
@@ -2659,6 +2679,8 @@ class V8_EXPORT String : public Name {
2659
2679
* Returns the number of bytes in the UTF-8 encoded
2660
2680
* representation of this string.
2661
2681
*/
2682
+ V8_DEPRECATED (" Use Isolate version instead" , int Utf8Length () const );
2683
+
2662
2684
int Utf8Length (Isolate* isolate) const ;
2663
2685
2664
2686
/* *
@@ -2715,12 +2737,23 @@ class V8_EXPORT String : public Name {
2715
2737
// 16-bit character codes.
2716
2738
int Write (Isolate* isolate, uint16_t * buffer, int start = 0 , int length = -1 ,
2717
2739
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 );
2718
2743
// One byte characters.
2719
2744
int WriteOneByte (Isolate* isolate, uint8_t * buffer, int start = 0 ,
2720
2745
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 );
2721
2750
// UTF-8 encoded characters.
2722
2751
int WriteUtf8 (Isolate* isolate, char * buffer, int length = -1 ,
2723
2752
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 );
2724
2757
2725
2758
/* *
2726
2759
* A zero length string.
@@ -2884,6 +2917,9 @@ class V8_EXPORT String : public Name {
2884
2917
*/
2885
2918
static Local<String> Concat (Isolate* isolate, Local<String> left,
2886
2919
Local<String> right);
2920
+ static V8_DEPRECATED (" Use Isolate* version" ,
2921
+ Local<String> Concat (Local<String> left,
2922
+ Local<String> right));
2887
2923
2888
2924
/* *
2889
2925
* Creates a new external string using the data defined in the given
@@ -2952,6 +2988,8 @@ class V8_EXPORT String : public Name {
2952
2988
*/
2953
2989
class V8_EXPORT Utf8Value {
2954
2990
public:
2991
+ V8_DEPRECATED (" Use Isolate version" ,
2992
+ explicit Utf8Value (Local<v8::Value> obj));
2955
2993
Utf8Value (Isolate* isolate, Local<v8::Value> obj);
2956
2994
~Utf8Value ();
2957
2995
char * operator *() { return str_; }
@@ -2975,6 +3013,7 @@ class V8_EXPORT String : public Name {
2975
3013
*/
2976
3014
class V8_EXPORT Value {
2977
3015
public:
3016
+ V8_DEPRECATED (" Use Isolate version" , explicit Value (Local<v8::Value> obj));
2978
3017
Value (Isolate* isolate, Local<v8::Value> obj);
2979
3018
~Value ();
2980
3019
uint16_t * operator *() { return str_; }
@@ -5217,6 +5256,8 @@ class V8_EXPORT BooleanObject : public Object {
5217
5256
class V8_EXPORT StringObject : public Object {
5218
5257
public:
5219
5258
static Local<Value> New (Isolate* isolate, Local<String> value);
5259
+ V8_DEPRECATED (" Use Isolate* version" ,
5260
+ static Local<Value> New (Local<String> value));
5220
5261
5221
5262
Local<String> ValueOf () const ;
5222
5263
@@ -10216,6 +10257,30 @@ template <class T> Value* Value::Cast(T* value) {
10216
10257
}
10217
10258
10218
10259
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
+
10219
10284
Boolean * Boolean::Cast (v8::Value* value) {
10220
10285
#ifdef V8_ENABLE_CHECKS
10221
10286
CheckCast (value);
0 commit comments