src: use local isolate instead of args.GetIsolate

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 <anna@addaleax.net>
Reviewed-By: Timothy Gu <timothygu99@gmail.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: Alexey Orlenko <eaglexrlnk@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
This commit is contained in:
Daniel Bevenius 2017-08-11 10:39:00 +02:00 committed by Anna Henningsen
parent d94e4b8e81
commit c27360ea74
No known key found for this signature in database
GPG Key ID: D8B9F5AEAE84E4CF

View File

@ -1285,7 +1285,7 @@ void SetupPromises(const FunctionCallbackInfo<Value>& args) {
env->process_object()->Delete(
env->context(),
FIXED_ONE_BYTE_STRING(args.GetIsolate(), "_setupPromises")).FromJust();
FIXED_ONE_BYTE_STRING(isolate, "_setupPromises")).FromJust();
}
} // anonymous namespace