refactor: use std::make_unique/base::MakeRefCounted when possible (#29637)
This commit is contained in:
parent
ebf54d7cc0
commit
56ac67e059
5 changed files with 9 additions and 5 deletions
|
@ -64,7 +64,9 @@ void InvokeIpcCallback(v8::Local<v8::Context> context,
|
|||
node::Environment* env = node::Environment::GetCurrent(context);
|
||||
std::unique_ptr<node::CallbackScope> callback_scope;
|
||||
if (env) {
|
||||
callback_scope.reset(new node::CallbackScope(isolate, ipcNative, {0, 0}));
|
||||
node::async_context async_context = {};
|
||||
callback_scope = std::make_unique<node::CallbackScope>(isolate, ipcNative,
|
||||
async_context);
|
||||
}
|
||||
|
||||
auto callback_key = gin::ConvertToV8(isolate, callback_name)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue