diff --git a/src/node_crypto.cc b/src/node_crypto.cc index 61ab265ce193b4..664bf1a72c7e8c 100644 --- a/src/node_crypto.cc +++ b/src/node_crypto.cc @@ -5664,9 +5664,7 @@ void RandomBytesBuffer(const FunctionCallbackInfo& 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(),