Skip to content

Commit 5d0cee4

Browse files
committed
vm: remove unnecessary HandleScopes
The accessors run inside an implicit HandleScope, there is no need to create a new one. PR-URL: #2001 Reviewed-By: Trevor Norris <[email protected]>
1 parent 91dfb5e commit 5d0cee4

File tree

1 file changed

+0
-6
lines changed

1 file changed

+0
-6
lines changed

src/node_contextify.cc

-6
Original file line numberDiff line numberDiff line change
@@ -362,7 +362,6 @@ class ContextifyContext {
362362
Local<String> property,
363363
const PropertyCallbackInfo<Value>& args) {
364364
Isolate* isolate = args.GetIsolate();
365-
HandleScope scope(isolate);
366365

367366
ContextifyContext* ctx =
368367
Unwrap<ContextifyContext>(args.Data().As<Object>());
@@ -387,7 +386,6 @@ class ContextifyContext {
387386
Local<Value> value,
388387
const PropertyCallbackInfo<Value>& args) {
389388
Isolate* isolate = args.GetIsolate();
390-
HandleScope scope(isolate);
391389

392390
ContextifyContext* ctx =
393391
Unwrap<ContextifyContext>(args.Data().As<Object>());
@@ -400,7 +398,6 @@ class ContextifyContext {
400398
Local<String> property,
401399
const PropertyCallbackInfo<Integer>& args) {
402400
Isolate* isolate = args.GetIsolate();
403-
HandleScope scope(isolate);
404401

405402
ContextifyContext* ctx =
406403
Unwrap<ContextifyContext>(args.Data().As<Object>());
@@ -422,7 +419,6 @@ class ContextifyContext {
422419
Local<String> property,
423420
const PropertyCallbackInfo<Boolean>& args) {
424421
Isolate* isolate = args.GetIsolate();
425-
HandleScope scope(isolate);
426422

427423
ContextifyContext* ctx =
428424
Unwrap<ContextifyContext>(args.Data().As<Object>());
@@ -435,8 +431,6 @@ class ContextifyContext {
435431

436432
static void GlobalPropertyEnumeratorCallback(
437433
const PropertyCallbackInfo<Array>& args) {
438-
HandleScope scope(args.GetIsolate());
439-
440434
ContextifyContext* ctx =
441435
Unwrap<ContextifyContext>(args.Data().As<Object>());
442436

0 commit comments

Comments
 (0)