0
0
mirror of https://github.com/nodejs/node.git synced 2024-11-29 15:06:33 +01:00

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>
This commit is contained in:
Ezequiel Garcia 2017-06-19 20:18:12 -03:00 committed by Tobias Nießen
parent f85d5b21fd
commit ea12038ffe
4 changed files with 0 additions and 5 deletions

View File

@ -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;

View File

@ -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"));
}

View File

@ -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"));
}

View File

@ -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>(),