Skip to content

Commit 174676a

Browse files
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. Signed-off-by: Ezequiel Garcia <[email protected]>
1 parent f40caf7 commit 174676a

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
@@ -25,14 +25,12 @@
2525
using v8::Function;
2626
using v8::FunctionCallbackInfo;
2727
using v8::Local;
28-
using v8::HandleScope;
2928
using v8::Isolate;
3029
using v8::Object;
3130
using v8::Value;
3231

3332
void Method(const FunctionCallbackInfo<Value>& args) {
3433
Isolate* isolate = args.GetIsolate();
35-
HandleScope scope(isolate);
3634
node::MakeCallback(isolate,
3735
isolate->GetCurrentContext()->Global(),
3836
args[0].As<Function>(),

0 commit comments

Comments
 (0)