Skip to content

Commit dc3d295

Browse files
ezequielgarciaMylesBorins
authored andcommitted
test: remove unneeded HandleScope usage
These methods are Javascript-accessible so they get an implicit HandleScope. The extra scope is unneeded and can be dropped. PR-URL: #13859 Reviewed-By: Ben Noordhuis <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Signed-off-by: Ezequiel Garcia <[email protected]>
1 parent 7142c92 commit dc3d295

File tree

4 files changed

+0
-5
lines changed

4 files changed

+0
-5
lines changed

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

-1
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,6 @@ void AfterAsync(uv_work_t* r) {
5555

5656
void Method(const v8::FunctionCallbackInfo<v8::Value>& args) {
5757
v8::Isolate* isolate = args.GetIsolate();
58-
v8::HandleScope scope(isolate);
5958

6059
async_req* req = new async_req;
6160
req->req.data = req;

test/addons/hello-world-function-export/binding.cc

-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33

44
void Method(const v8::FunctionCallbackInfo<v8::Value>& args) {
55
v8::Isolate* isolate = args.GetIsolate();
6-
v8::HandleScope scope(isolate);
76
args.GetReturnValue().Set(v8::String::NewFromUtf8(isolate, "world"));
87
}
98

test/addons/hello-world/binding.cc

-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33

44
void Method(const v8::FunctionCallbackInfo<v8::Value>& args) {
55
v8::Isolate* isolate = args.GetIsolate();
6-
v8::HandleScope scope(isolate);
76
args.GetReturnValue().Set(v8::String::NewFromUtf8(isolate, "world"));
87
}
98

test/addons/repl-domain-abort/binding.cc

-2
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,12 @@
44
using v8::Function;
55
using v8::FunctionCallbackInfo;
66
using v8::Local;
7-
using v8::HandleScope;
87
using v8::Isolate;
98
using v8::Object;
109
using v8::Value;
1110

1211
void Method(const FunctionCallbackInfo<Value>& args) {
1312
Isolate* isolate = args.GetIsolate();
14-
HandleScope scope(isolate);
1513
node::MakeCallback(isolate,
1614
isolate->GetCurrentContext()->Global(),
1715
args[0].As<Function>(),

0 commit comments

Comments
 (0)