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

@ -92,11 +92,11 @@ class NodeBindings {
// Load node.js in the environment.
void LoadEnvironment(node::Environment* env);
// Prepare for message loop integration.
virtual void PrepareMessageLoop();
// Prepare embed thread for message loop integration.
void PrepareEmbedThread();
// Do message loop integration.
virtual void RunMessageLoop();
// Notify embed thread to start polling after environment is loaded.
void StartPolling();
// Gets/sets the per isolate data.
void set_isolate_data(node::IsolateData* isolate_data) {
@ -144,6 +144,9 @@ class NodeBindings {
// Thread to poll uv events.
static void EmbedThreadRunner(void* arg);
// Indicates whether polling thread has been created.
bool initialized_ = false;
// Whether the libuv loop has ended.
bool embed_closed_ = false;