chore: use node_bindings loop for clarity (#24391)

This commit is contained in:
Shelley Vohr 2020-07-03 09:19:27 -07:00 committed by GitHub
parent 9106d0c6d5
commit 4398ecb6c8
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View file

@ -251,7 +251,7 @@ ElectronBrowserMainParts::ElectronBrowserMainParts(
browser_(new Browser),
node_bindings_(
NodeBindings::Create(NodeBindings::BrowserEnvironment::BROWSER)),
electron_bindings_(new ElectronBindings(uv_default_loop())) {
electron_bindings_(new ElectronBindings(node_bindings_->uv_loop())) {
DCHECK(!self_) << "Cannot have two ElectronBrowserMainParts";
self_ = this;
}

View file

@ -37,7 +37,7 @@ bool IsDevToolsExtension(content::RenderFrame* render_frame) {
ElectronRendererClient::ElectronRendererClient()
: node_bindings_(
NodeBindings::Create(NodeBindings::BrowserEnvironment::RENDERER)),
electron_bindings_(new ElectronBindings(uv_default_loop())) {}
electron_bindings_(new ElectronBindings(node_bindings_->uv_loop())) {}
ElectronRendererClient::~ElectronRendererClient() {
asar::ClearArchives();