@@ -996,6 +996,10 @@ class V8_EXPORT PrimitiveArray {
996
996
public:
997
997
static Local<PrimitiveArray> New (Isolate* isolate, int length);
998
998
int Length () const ;
999
+ V8_DEPRECATED (" Use Isolate* version" ,
1000
+ void Set (int index, Local<Primitive> item));
1001
+ V8_DEPRECATED (" Use Isolate* version" ,
1002
+ Local<Primitive> Get (int index));
999
1003
void Set (Isolate* isolate, int index, Local<Primitive> item);
1000
1004
Local<Primitive> Get (Isolate* isolate, int index);
1001
1005
};
@@ -1699,6 +1703,8 @@ class V8_EXPORT StackTrace {
1699
1703
/* *
1700
1704
* Returns a StackFrame at a particular index.
1701
1705
*/
1706
+ V8_DEPRECATED (" Use Isolate version" ,
1707
+ Local<StackFrame> GetFrame (uint32_t index) const );
1702
1708
Local<StackFrame> GetFrame (Isolate* isolate, uint32_t index) const ;
1703
1709
1704
1710
/* *
@@ -2407,6 +2413,13 @@ class V8_EXPORT Value : public Data {
2407
2413
V8_DEPRECATE_SOON (" Use maybe version" ,
2408
2414
Local<Int32> ToInt32 (Isolate* isolate) const );
2409
2415
2416
+ inline V8_DEPRECATED (" Use maybe version" ,
2417
+ Local<Boolean > ToBoolean () const );
2418
+ inline V8_DEPRECATED (" Use maybe version" , Local<String> ToString () const );
2419
+ inline V8_DEPRECATED (" Use maybe version" , Local<Object> ToObject () const );
2420
+ inline V8_DEPRECATED (" Use maybe version" ,
2421
+ Local<Integer> ToInteger () const );
2422
+
2410
2423
/* *
2411
2424
* Attempts to convert a string to an array index.
2412
2425
* Returns an empty handle if the conversion fails.
@@ -2426,7 +2439,14 @@ class V8_EXPORT Value : public Data {
2426
2439
Local<Context> context) const ;
2427
2440
V8_WARN_UNUSED_RESULT Maybe<int32_t > Int32Value (Local<Context> context) const ;
2428
2441
2442
+ V8_DEPRECATED (" Use maybe version" , bool BooleanValue () const );
2443
+ V8_DEPRECATED (" Use maybe version" , double NumberValue () const );
2444
+ V8_DEPRECATED (" Use maybe version" , int64_t IntegerValue () const );
2445
+ V8_DEPRECATED (" Use maybe version" , uint32_t Uint32Value () const );
2446
+ V8_DEPRECATED (" Use maybe version" , int32_t Int32Value () const );
2447
+
2429
2448
/* * JS == */
2449
+ V8_DEPRECATED (" Use maybe version" , bool Equals (Local<Value> that) const );
2430
2450
V8_WARN_UNUSED_RESULT Maybe<bool > Equals (Local<Context> context,
2431
2451
Local<Value> that) const ;
2432
2452
bool StrictEquals (Local<Value> that) const ;
@@ -2533,6 +2553,8 @@ class V8_EXPORT String : public Name {
2533
2553
* Returns the number of bytes in the UTF-8 encoded
2534
2554
* representation of this string.
2535
2555
*/
2556
+ V8_DEPRECATED (" Use Isolate version instead" , int Utf8Length () const );
2557
+
2536
2558
int Utf8Length (Isolate* isolate) const ;
2537
2559
2538
2560
/* *
@@ -2589,12 +2611,23 @@ class V8_EXPORT String : public Name {
2589
2611
// 16-bit character codes.
2590
2612
int Write (Isolate* isolate, uint16_t * buffer, int start = 0 , int length = -1 ,
2591
2613
int options = NO_OPTIONS) const ;
2614
+ V8_DEPRECATED (" Use Isolate* version" ,
2615
+ int Write (uint16_t * buffer, int start = 0 , int length = -1 ,
2616
+ int options = NO_OPTIONS) const );
2592
2617
// One byte characters.
2593
2618
int WriteOneByte (Isolate* isolate, uint8_t * buffer, int start = 0 ,
2594
2619
int length = -1 , int options = NO_OPTIONS) const ;
2620
+ V8_DEPRECATED (" Use Isolate* version" ,
2621
+ int WriteOneByte (uint8_t * buffer, int start = 0 ,
2622
+ int length = -1 , int options = NO_OPTIONS)
2623
+ const );
2595
2624
// UTF-8 encoded characters.
2596
2625
int WriteUtf8 (Isolate* isolate, char * buffer, int length = -1 ,
2597
2626
int * nchars_ref = nullptr , int options = NO_OPTIONS) const ;
2627
+ V8_DEPRECATED (" Use Isolate* version" ,
2628
+ int WriteUtf8 (char * buffer, int length = -1 ,
2629
+ int * nchars_ref = nullptr ,
2630
+ int options = NO_OPTIONS) const );
2598
2631
2599
2632
/* *
2600
2633
* A zero length string.
@@ -2786,6 +2819,9 @@ class V8_EXPORT String : public Name {
2786
2819
*/
2787
2820
static Local<String> Concat (Isolate* isolate, Local<String> left,
2788
2821
Local<String> right);
2822
+ static V8_DEPRECATED (" Use Isolate* version" ,
2823
+ Local<String> Concat (Local<String> left,
2824
+ Local<String> right));
2789
2825
2790
2826
/* *
2791
2827
* Creates a new external string using the data defined in the given
@@ -2854,6 +2890,8 @@ class V8_EXPORT String : public Name {
2854
2890
*/
2855
2891
class V8_EXPORT Utf8Value {
2856
2892
public:
2893
+ V8_DEPRECATED (" Use Isolate version" ,
2894
+ explicit Utf8Value (Local<v8::Value> obj));
2857
2895
Utf8Value (Isolate* isolate, Local<v8::Value> obj);
2858
2896
~Utf8Value ();
2859
2897
char * operator *() { return str_; }
@@ -2877,6 +2915,7 @@ class V8_EXPORT String : public Name {
2877
2915
*/
2878
2916
class V8_EXPORT Value {
2879
2917
public:
2918
+ V8_DEPRECATED (" Use Isolate version" , explicit Value (Local<v8::Value> obj));
2880
2919
Value (Isolate* isolate, Local<v8::Value> obj);
2881
2920
~Value ();
2882
2921
uint16_t * operator *() { return str_; }
@@ -5271,6 +5310,8 @@ class V8_EXPORT BooleanObject : public Object {
5271
5310
class V8_EXPORT StringObject : public Object {
5272
5311
public:
5273
5312
static Local<Value> New (Isolate* isolate, Local<String> value);
5313
+ V8_DEPRECATED (" Use Isolate* version" ,
5314
+ static Local<Value> New (Local<String> value));
5274
5315
5275
5316
Local<String> ValueOf () const ;
5276
5317
@@ -10127,6 +10168,30 @@ template <class T> Value* Value::Cast(T* value) {
10127
10168
}
10128
10169
10129
10170
10171
+ Local<Boolean > Value::ToBoolean () const {
10172
+ return ToBoolean (Isolate::GetCurrent ()->GetCurrentContext ())
10173
+ .FromMaybe (Local<Boolean >());
10174
+ }
10175
+
10176
+
10177
+ Local<String> Value::ToString () const {
10178
+ return ToString (Isolate::GetCurrent ()->GetCurrentContext ())
10179
+ .FromMaybe (Local<String>());
10180
+ }
10181
+
10182
+
10183
+ Local<Object> Value::ToObject () const {
10184
+ return ToObject (Isolate::GetCurrent ()->GetCurrentContext ())
10185
+ .FromMaybe (Local<Object>());
10186
+ }
10187
+
10188
+
10189
+ Local<Integer> Value::ToInteger () const {
10190
+ return ToInteger (Isolate::GetCurrent ()->GetCurrentContext ())
10191
+ .FromMaybe (Local<Integer>());
10192
+ }
10193
+
10194
+
10130
10195
Boolean * Boolean::Cast (v8::Value* value) {
10131
10196
#ifdef V8_ENABLE_CHECKS
10132
10197
CheckCast (value);
0 commit comments