fix: crash on WebWorker destruction (#35422)
This commit is contained in:
parent
2f23bdb19e
commit
1847581848
2 changed files with 7 additions and 3 deletions
|
@ -136,7 +136,7 @@ index 7cd3a2a954ff7d70e6ba7a6f7538648841bc54b2..f89b7158218be60ac10e61484a2d5e5e
|
||||||
|
|
||||||
|
|
||||||
diff --git a/deps/uv/src/unix/loop.c b/deps/uv/src/unix/loop.c
|
diff --git a/deps/uv/src/unix/loop.c b/deps/uv/src/unix/loop.c
|
||||||
index a88e71c339351f2ebcdd6c3f933fc3b1122910ed..353143e5ebecae598425dc036f4458bb7c43bb0b 100644
|
index a88e71c339351f2ebcdd6c3f933fc3b1122910ed..46fc03264b6cc1a3a4d8faf5ec5a754fc07c9b6d 100644
|
||||||
--- a/deps/uv/src/unix/loop.c
|
--- a/deps/uv/src/unix/loop.c
|
||||||
+++ b/deps/uv/src/unix/loop.c
|
+++ b/deps/uv/src/unix/loop.c
|
||||||
@@ -217,6 +217,11 @@ int uv__loop_configure(uv_loop_t* loop, uv_loop_option option, va_list ap) {
|
@@ -217,6 +217,11 @@ int uv__loop_configure(uv_loop_t* loop, uv_loop_option option, va_list ap) {
|
||||||
|
@ -151,7 +151,7 @@ index a88e71c339351f2ebcdd6c3f933fc3b1122910ed..353143e5ebecae598425dc036f4458bb
|
||||||
if (option != UV_LOOP_BLOCK_SIGNAL)
|
if (option != UV_LOOP_BLOCK_SIGNAL)
|
||||||
return UV_ENOSYS;
|
return UV_ENOSYS;
|
||||||
|
|
||||||
@@ -226,3 +231,37 @@ int uv__loop_configure(uv_loop_t* loop, uv_loop_option option, va_list ap) {
|
@@ -226,3 +231,40 @@ int uv__loop_configure(uv_loop_t* loop, uv_loop_option option, va_list ap) {
|
||||||
loop->flags |= UV_LOOP_BLOCK_SIGPROF;
|
loop->flags |= UV_LOOP_BLOCK_SIGPROF;
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -183,6 +183,9 @@ index a88e71c339351f2ebcdd6c3f933fc3b1122910ed..353143e5ebecae598425dc036f4458bb
|
||||||
+ if (r == len)
|
+ if (r == len)
|
||||||
+ return;
|
+ return;
|
||||||
+
|
+
|
||||||
|
+ if (!uv_loop_alive(loop))
|
||||||
|
+ return;
|
||||||
|
+
|
||||||
+ if (r == -1)
|
+ if (r == -1)
|
||||||
+ if (errno == EAGAIN || errno == EWOULDBLOCK)
|
+ if (errno == EAGAIN || errno == EWOULDBLOCK)
|
||||||
+ return;
|
+ return;
|
||||||
|
|
|
@ -37,6 +37,7 @@
|
||||||
#include "shell/common/mac/main_application_bundle.h"
|
#include "shell/common/mac/main_application_bundle.h"
|
||||||
#include "shell/common/node_includes.h"
|
#include "shell/common/node_includes.h"
|
||||||
#include "third_party/blink/renderer/bindings/core/v8/v8_initializer.h" // nogncheck
|
#include "third_party/blink/renderer/bindings/core/v8/v8_initializer.h" // nogncheck
|
||||||
|
#include "third_party/electron_node/src/debug_utils.h"
|
||||||
|
|
||||||
#if !defined(MAS_BUILD)
|
#if !defined(MAS_BUILD)
|
||||||
#include "shell/common/crash_keys.h"
|
#include "shell/common/crash_keys.h"
|
||||||
|
@ -136,7 +137,7 @@ void stop_and_close_uv_loop(uv_loop_t* loop) {
|
||||||
break;
|
break;
|
||||||
|
|
||||||
DCHECK_EQ(0, uv_loop_alive(loop));
|
DCHECK_EQ(0, uv_loop_alive(loop));
|
||||||
uv_loop_close(loop);
|
node::CheckedUvLoopClose(loop);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool g_is_initialized = false;
|
bool g_is_initialized = false;
|
||||||
|
|
Loading…
Reference in a new issue