Skip to content

Commit

Permalink
test: fix warning in dlopen-ping-pong/binding.cc
Browse files Browse the repository at this point in the history
Currently, the following compiler warning is issued:
../binding.cc:26:27:
warning: 'Utf8Value' is deprecated [-Wdeprecated-declarations]
  const String::Utf8Value filename(args[0]);
                          ^

This commit updates the code to use the Isolate version.

PR-URL: #19966
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
  • Loading branch information
danbev authored and jasnell committed Apr 16, 2018
1 parent 86c1f19 commit 65bd225
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion test/addons/dlopen-ping-pong/binding.cc
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ typedef const char* (*ping)(void);
static ping ping_func;

void LoadLibrary(const FunctionCallbackInfo<Value>& args) {
const String::Utf8Value filename(args[0]);
const String::Utf8Value filename(args.GetIsolate(), args[0]);
void* handle = dlopen(*filename, RTLD_LAZY);
assert(handle != nullptr);
ping_func = reinterpret_cast<ping>(dlsym(handle, "dlopen_ping"));
Expand Down

0 comments on commit 65bd225

Please sign in to comment.