Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 13b8011

Browse filesBrowse files
committed
test: remove usage of deprecated V8 APIs in addons
PR-URL: #22704 Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
1 parent e85aa19 commit 13b8011
Copy full SHA for 13b8011

File tree

Expand file treeCollapse file tree

3 files changed

+5
-5
lines changed
Open diff view settings
Filter options
Expand file treeCollapse file tree

3 files changed

+5
-5
lines changed
Open diff view settings
Collapse file

‎test/addons/async-hello-world/binding.cc‎

Copy file name to clipboardExpand all lines: test/addons/async-hello-world/binding.cc
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ void Method(const v8::FunctionCallbackInfo<v8::Value>& args) {
7373
async_req* req = new async_req;
7474
req->req.data = req;
7575

76-
req->input = args[0]->IntegerValue();
76+
req->input = args[0].As<v8::Integer>()->Value();
7777
req->output = 0;
7878
req->isolate = isolate;
7979
req->context = node::EmitAsyncInit(isolate, v8::Object::New(isolate), "test");
Collapse file

‎test/addons/buffer-free-callback/binding.cc‎

Copy file name to clipboardExpand all lines: test/addons/buffer-free-callback/binding.cc
+3-3Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,16 +15,16 @@ void Alloc(const v8::FunctionCallbackInfo<v8::Value>& args) {
1515
v8::Isolate* isolate = args.GetIsolate();
1616
alive++;
1717

18-
uintptr_t alignment = args[1]->IntegerValue();
19-
uintptr_t offset = args[2]->IntegerValue();
18+
uintptr_t alignment = args[1].As<v8::Integer>()->Value();
19+
uintptr_t offset = args[2].As<v8::Integer>()->Value();
2020

2121
uintptr_t static_offset = reinterpret_cast<uintptr_t>(buf) % alignment;
2222
char* aligned = buf + (alignment - static_offset) + offset;
2323

2424
args.GetReturnValue().Set(node::Buffer::New(
2525
isolate,
2626
aligned,
27-
args[0]->IntegerValue(),
27+
args[0].As<v8::Integer>()->Value(),
2828
FreeCallback,
2929
nullptr).ToLocalChecked());
3030
}
Collapse file

‎test/addons/stringbytes-external-exceed-max/binding.cc‎

Copy file name to clipboardExpand all lines: test/addons/stringbytes-external-exceed-max/binding.cc
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
void EnsureAllocation(const v8::FunctionCallbackInfo<v8::Value> &args) {
66
v8::Isolate* isolate = args.GetIsolate();
7-
uintptr_t size = args[0]->IntegerValue();
7+
uintptr_t size = args[0].As<v8::Integer>()->Value();
88
v8::Local<v8::Boolean> success;
99

1010
void* buffer = malloc(size);

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.