Skip to content

Commit 3f98b0f

Browse files
tniessenaddaleax
authored andcommitted
src: reuse 'ondone' string in node_crypto.cc
PR-URL: #14587 Reviewed-By: Anna Henningsen <[email protected]>
1 parent efea3fc commit 3f98b0f

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

src/node_crypto.cc

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5664,9 +5664,7 @@ void RandomBytesBuffer(const FunctionCallbackInfo<Value>& args) {
56645664
data,
56655665
RandomBytesRequest::DONT_FREE_DATA);
56665666
if (args[3]->IsFunction()) {
5667-
obj->Set(env->context(),
5668-
FIXED_ONE_BYTE_STRING(args.GetIsolate(), "ondone"),
5669-
args[3]).FromJust();
5667+
obj->Set(env->context(), env->ondone_string(), args[3]).FromJust();
56705668

56715669
if (env->in_domain()) {
56725670
obj->Set(env->context(),

0 commit comments

Comments
 (0)