Browse Source

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 <info@bnoordhuis.nl>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Signed-off-by: Ezequiel Garcia <ezequiel@vanguardiasur.com.ar>
v6
Ezequiel Garcia 8 years ago
committed by Tobias Nießen
parent
commit
ea12038ffe
  1. 1
      test/addons/async-hello-world/binding.cc
  2. 1
      test/addons/hello-world-function-export/binding.cc
  3. 1
      test/addons/hello-world/binding.cc
  4. 2
      test/addons/repl-domain-abort/binding.cc

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

@ -55,7 +55,6 @@ void AfterAsync(uv_work_t* r) {
void Method(const v8::FunctionCallbackInfo<v8::Value>& args) {
v8::Isolate* isolate = args.GetIsolate();
v8::HandleScope scope(isolate);
async_req* req = new async_req;
req->req.data = req;

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

@ -3,7 +3,6 @@
void Method(const v8::FunctionCallbackInfo<v8::Value>& args) {
v8::Isolate* isolate = args.GetIsolate();
v8::HandleScope scope(isolate);
args.GetReturnValue().Set(v8::String::NewFromUtf8(isolate, "world"));
}

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

@ -3,7 +3,6 @@
void Method(const v8::FunctionCallbackInfo<v8::Value>& args) {
v8::Isolate* isolate = args.GetIsolate();
v8::HandleScope scope(isolate);
args.GetReturnValue().Set(v8::String::NewFromUtf8(isolate, "world"));
}

2
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<Value>& args) {
Isolate* isolate = args.GetIsolate();
HandleScope scope(isolate);
node::MakeCallback(isolate,
isolate->GetCurrentContext()->Global(),
args[0].As<Function>(),

Loading…
Cancel
Save