chore: remove redundant code in node integration (#33500)

This commit is contained in:
Cheng Zhao 2022-03-30 12:09:42 +09:00 committed by GitHub
parent df3cfb663c
commit c119b1ebef
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
11 changed files with 32 additions and 108 deletions

View file

@ -93,9 +93,7 @@ void ElectronRendererClient::DidCreateScriptContext(
if (!node_integration_initialized_) {
node_integration_initialized_ = true;
node_bindings_->Initialize();
node_bindings_->PrepareMessageLoop();
} else {
node_bindings_->PrepareMessageLoop();
node_bindings_->PrepareEmbedThread();
}
// Setup node tracing controller.
@ -131,7 +129,7 @@ void ElectronRendererClient::DidCreateScriptContext(
node_bindings_->set_uv_env(env);
// Give the node loop a run to make sure everything is ready.
node_bindings_->RunMessageLoop();
node_bindings_->StartPolling();
}
}