node icon indicating copy to clipboard operation
node copied to clipboard

`v8::String::Value` is deprecated

Open targos opened this issue 1 year ago • 1 comments

We should use v8::String::ValueView instead.

Refs: https://github.com/nodejs/node/blob/e4f61de14f8cfb83f1ce0ad1597b86278cd5f5f1/deps/v8/include/v8-primitive.h#L549-L553

/cc @anonrig

targos avatar Aug 17 '24 06:08 targos

Here are the places where we use it:


[51/238] CXX obj/src/libnode.node_buffer.o
../../src/node_buffer.cc:969:19: warning: 'Value' is deprecated: Prefer using String::ValueView if you can, or string->Write to a buffer if you cannot. [-Wdeprecated-declarations]
    String::Value needle_value(isolate, needle);
                  ^

../../src/node_buffer.cc:1299:19: warning: 'Value' is deprecated: Prefer using String::ValueView if you can, or string->Write to a buffer if you cannot. [-Wdeprecated-declarations]
    String::Value value(env->isolate(), input);
                  ^

../../src/node_buffer.cc:1359:19: warning: 'Value' is deprecated: Prefer using String::ValueView if you can, or string->Write to a buffer if you cannot. [-Wdeprecated-declarations]
    String::Value value(env->isolate(), input);
                  ^

[11/113] CXX obj/src/libnode.inspector_js_api.o
../../src/inspector_js_api.cc:249:17: warning: 'Value' is deprecated: Prefer using String::ValueView if you can, or string->Write to a buffer if you cannot. [-Wdeprecated-declarations]
  String::Value task_name_value(args.GetIsolate(), task_name);
                ^

[143/272] CXX obj/src/libnode.string_bytes.o
../../src/string_bytes.cc:325:23: warning: 'Value' is deprecated: Prefer using String::ValueView if you can, or string->Write to a buffer if you cannot. [-Wdeprecated-declarations]
        String::Value value(isolate, str);
                      ^

../../src/string_bytes.cc:381:23: warning: 'Value' is deprecated: Prefer using String::ValueView if you can, or string->Write to a buffer if you cannot. [-Wdeprecated-declarations]
        String::Value value(isolate, str);
                      ^

../../src/string_bytes.cc:403:23: warning: 'Value' is deprecated: Prefer using String::ValueView if you can, or string->Write to a buffer if you cannot. [-Wdeprecated-declarations]
        String::Value value(isolate, str);
                      ^

../../src/string_bytes.cc:497:21: warning: 'Value' is deprecated: Prefer using String::ValueView if you can, or string->Write to a buffer if you cannot. [-Wdeprecated-declarations]
      String::Value value(isolate, str);
                    ^

../../src/string_bytes.cc:503:21: warning: 'Value' is deprecated: Prefer using String::ValueView if you can, or string->Write to a buffer if you cannot. [-Wdeprecated-declarations]
      String::Value value(isolate, str);
                    ^

[159/272] CXX obj/src/libnode.inspector_js_api.o
../../src/inspector_js_api.cc:249:17: warning: 'Value' is deprecated: Prefer using String::ValueView if you can, or string->Write to a buffer if you cannot. [-Wdeprecated-declarations]
  String::Value task_name_value(args.GetIsolate(), task_name);
                ^

targos avatar Aug 17 '24 06:08 targos