From c4018e8a482f50ceb5a4ea3b0c744014e22deeb5 Mon Sep 17 00:00:00 2001 From: Ezequiel Garcia Date: Mon, 19 Jun 2017 20:18:12 -0300 Subject: [PATCH] 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: https://github.com/nodejs/node/pull/13859 Reviewed-By: Ben Noordhuis Reviewed-By: James M Snell Reviewed-By: Colin Ihrig Signed-off-by: Ezequiel Garcia --- test/addons/async-hello-world/binding.cc | 1 - test/addons/hello-world-function-export/binding.cc | 1 - test/addons/hello-world/binding.cc | 1 - test/addons/repl-domain-abort/binding.cc | 2 -- 4 files changed, 5 deletions(-) diff --git a/test/addons/async-hello-world/binding.cc b/test/addons/async-hello-world/binding.cc index 70fee63aa5e648..da2bd417cd9a6f 100644 --- a/test/addons/async-hello-world/binding.cc +++ b/test/addons/async-hello-world/binding.cc @@ -55,7 +55,6 @@ void AfterAsync(uv_work_t* r) { void Method(const v8::FunctionCallbackInfo& args) { v8::Isolate* isolate = args.GetIsolate(); - v8::HandleScope scope(isolate); async_req* req = new async_req; req->req.data = req; diff --git a/test/addons/hello-world-function-export/binding.cc b/test/addons/hello-world-function-export/binding.cc index c113e0489bde0e..9a93a806e7156e 100644 --- a/test/addons/hello-world-function-export/binding.cc +++ b/test/addons/hello-world-function-export/binding.cc @@ -3,7 +3,6 @@ void Method(const v8::FunctionCallbackInfo& args) { v8::Isolate* isolate = args.GetIsolate(); - v8::HandleScope scope(isolate); args.GetReturnValue().Set(v8::String::NewFromUtf8(isolate, "world")); } diff --git a/test/addons/hello-world/binding.cc b/test/addons/hello-world/binding.cc index 5651dc8f50a317..83823ae8363cd9 100644 --- a/test/addons/hello-world/binding.cc +++ b/test/addons/hello-world/binding.cc @@ -3,7 +3,6 @@ void Method(const v8::FunctionCallbackInfo& args) { v8::Isolate* isolate = args.GetIsolate(); - v8::HandleScope scope(isolate); args.GetReturnValue().Set(v8::String::NewFromUtf8(isolate, "world")); } diff --git a/test/addons/repl-domain-abort/binding.cc b/test/addons/repl-domain-abort/binding.cc index 9363a16617382d..b2f2c74348c655 100644 --- a/test/addons/repl-domain-abort/binding.cc +++ b/test/addons/repl-domain-abort/binding.cc @@ -25,14 +25,12 @@ using v8::Function; using v8::FunctionCallbackInfo; using v8::Local; -using v8::HandleScope; using v8::Isolate; using v8::Object; using v8::Value; void Method(const FunctionCallbackInfo& args) { Isolate* isolate = args.GetIsolate(); - HandleScope scope(isolate); node::MakeCallback(isolate, isolate->GetCurrentContext()->Global(), args[0].As(),