From c27360ea7499b25a550db414644df1816258d594 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 5b1b9cadd93cb3..bfd1eeb954dd54 100644 --- a/src/node.cc +++ b/src/node.cc @@ -1285,7 +1285,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(); } } // anonymous namespace