From d20b7bfb6ef033f949211b490bfed70a73dad01e Mon Sep 17 00:00:00 2001 From: Daniel Bevenius Date: Fri, 11 Aug 2017 10:39:00 +0200 Subject: [PATCH] src: use local isolate instead of args.GetIsolate MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit While stepping though SetupPromises I noticed that the environments Isolate is used but not when creating the string "_setupPromises". Is there a reason for using args.GetIsolate() instead of using the environments isolate? I see that GetIsolate() is an inline call, but could there be situations where it returns a different Isolate? If not perhaps using the local isolate variable would be a litte clearer. PR-URL: https://github.com/nodejs/node/pull/14768 Reviewed-By: Anna Henningsen Reviewed-By: Timothy Gu Reviewed-By: Tobias Nießen Reviewed-By: Alexey Orlenko Reviewed-By: Colin Ihrig --- src/node.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/node.cc b/src/node.cc index 984c228205378d..33d97a0fcc8664 100644 --- a/src/node.cc +++ b/src/node.cc @@ -1230,7 +1230,7 @@ void SetupPromises(const FunctionCallbackInfo& args) { env->process_object()->Delete( env->context(), - FIXED_ONE_BYTE_STRING(args.GetIsolate(), "_setupPromises")).FromJust(); + FIXED_ONE_BYTE_STRING(isolate, "_setupPromises")).FromJust(); }