Skip to content

Commit

Permalink
src: use local isolate instead of args.GetIsolate
Browse files Browse the repository at this point in the history
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: #14768
Reviewed-By: Anna Henningsen <[email protected]>
Reviewed-By: Timothy Gu <[email protected]>
Reviewed-By: Tobias Nießen <[email protected]>
Reviewed-By: Alexey Orlenko <[email protected]>
Reviewed-By: Colin Ihrig <[email protected]>
  • Loading branch information
danbev authored and addaleax committed Aug 13, 2017
1 parent ee2ae0f commit f83827d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/node.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1281,7 +1281,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
Expand Down

0 comments on commit f83827d

Please sign in to comment.