mirror of
https://github.com/electron/electron.git
synced 2026-04-10 03:01:51 -04:00
fix: libuv hang on Windows (#28337)
* fix: libuv hang on Windows * test: add a hang test Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>
This commit is contained in:
@@ -534,15 +534,13 @@ void NodeBindings::LoadEnvironment(node::Environment* env) {
|
||||
void NodeBindings::PrepareMessageLoop() {
|
||||
#if !defined(OS_WIN)
|
||||
int handle = uv_backend_fd(uv_loop_);
|
||||
#else
|
||||
HANDLE handle = uv_loop_->iocp;
|
||||
#endif
|
||||
|
||||
// If the backend fd hasn't changed, don't proceed.
|
||||
if (handle == handle_)
|
||||
return;
|
||||
|
||||
handle_ = handle;
|
||||
#endif
|
||||
|
||||
// Add dummy handle for libuv, otherwise libuv would quit when there is
|
||||
// nothing to do.
|
||||
|
||||
@@ -159,9 +159,7 @@ class NodeBindings {
|
||||
// Isolate data used in creating the environment
|
||||
node::IsolateData* isolate_data_ = nullptr;
|
||||
|
||||
#if defined(OS_WIN)
|
||||
HANDLE handle_;
|
||||
#else
|
||||
#if !defined(OS_WIN)
|
||||
int handle_ = -1;
|
||||
#endif
|
||||
|
||||
|
||||
Reference in New Issue
Block a user