Skip to content

test: fix NewFromUtf8 compiler warning

Currently there are a number of compiler warnings like the following:

../binding.cc:6:41:
warning: 'NewFromUtf8' is deprecated:
Use maybe version [-Wdeprecated-declarations]
  args.GetReturnValue().Set(v8::String::NewFromUtf8(isolate, "world"));
                                        ^
/node/deps/v8/include/v8.h:2883:10:
note: 'NewFromUtf8' has been explicitly marked deprecated here
  static V8_DEPRECATE_SOON(
         ^
/node/deps/v8/include/v8config.h:341:29:
note: expanded from macro 'V8_DEPRECATE_SOON'
  declarator __attribute__((deprecated(message)))
                            ^

This commit updates the code to use the maybe versions.

Checklist
  • make -j4 test (UNIX), or vcbuild test (Windows) passes
  • documentation is changed or added
  • commit message follows commit guidelines

Merge request reports

Loading