Skip to content

Commit

Permalink
test: remove unneeded HandleScope usage
Browse files Browse the repository at this point in the history
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 <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>
  • Loading branch information
ezequielgarcia authored and MylesBorins committed Aug 14, 2017
1 parent da8851c commit 8fcae92
Show file tree
Hide file tree
Showing 4 changed files with 0 additions and 5 deletions.
1 change: 0 additions & 1 deletion test/addons/async-hello-world/binding.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
1 change: 0 additions & 1 deletion test/addons/hello-world-function-export/binding.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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"));
}

Expand Down
1 change: 0 additions & 1 deletion test/addons/hello-world/binding.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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"));
}

Expand Down
2 changes: 0 additions & 2 deletions test/addons/repl-domain-abort/binding.cc
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,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>(),
Expand Down

0 comments on commit 8fcae92

Please sign in to comment.