Skip to content

Commit

Permalink
src: reuse 'ondone' string in node_crypto.cc
Browse files Browse the repository at this point in the history
PR-URL: #14587
Reviewed-By: Anna Henningsen <[email protected]>
  • Loading branch information
tniessen authored and addaleax committed Aug 7, 2017
1 parent efea3fc commit 3f98b0f
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions src/node_crypto.cc
Original file line number Diff line number Diff line change
Expand Up @@ -5664,9 +5664,7 @@ void RandomBytesBuffer(const FunctionCallbackInfo<Value>& args) {
data,
RandomBytesRequest::DONT_FREE_DATA);
if (args[3]->IsFunction()) {
obj->Set(env->context(),
FIXED_ONE_BYTE_STRING(args.GetIsolate(), "ondone"),
args[3]).FromJust();
obj->Set(env->context(), env->ondone_string(), args[3]).FromJust();

if (env->in_domain()) {
obj->Set(env->context(),
Expand Down

0 comments on commit 3f98b0f

Please sign in to comment.