Skip to content

Commit d5e8d24

Browse files
feat: fix compilation warning about deprecated native API
Bumping prebuildify to include up to date node headers
1 parent 651c51d commit d5e8d24

File tree

4 files changed

+210
-960
lines changed

4 files changed

+210
-960
lines changed

flake.nix

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@
4040
with pkgs;
4141
[
4242
typescript-language-server
43+
clang-tools
4344
]
4445
++ commonBuildInputs;
4546
shellHook = ''

packages/core/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
"node-addon-api": "^5.1.0",
2525
"node-gyp": "^9.3.1",
2626
"openapi-typescript-codegen": "^0.23.0",
27-
"prebuildify": "^5.0.1"
27+
"prebuildify": "^6.0.1"
2828
},
2929
"dependencies": {
3030
"axios": "^1.4.0",

packages/core/src/native_core/linux_perf/utils.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,11 @@
55

66
static inline std::string
77
v8LocalStringToString(v8::Local<v8::String> v8String) {
8-
std::string buffer(v8String->Utf8Length(v8::Isolate::GetCurrent()) + 1, 0);
9-
v8String->WriteUtf8(v8::Isolate::GetCurrent(), &buffer[0],
10-
v8String->Utf8Length(v8::Isolate::GetCurrent()) + 1);
8+
std::string buffer(v8String->Utf8LengthV2(v8::Isolate::GetCurrent()) + 1, 0);
9+
v8String->WriteUtf8V2(v8::Isolate::GetCurrent(), &buffer[0],
10+
v8String->Utf8LengthV2(v8::Isolate::GetCurrent()) + 1);
1111
// Sanitize name, removing unwanted \0 resulted from WriteUtf8
1212
return std::string(buffer.c_str());
1313
}
1414

15-
#endif // LINUX_PERF_UTILS_H
15+
#endif // LINUX_PERF_UTILS_H

0 commit comments

Comments
 (0)