File tree Expand file tree Collapse file tree 2 files changed +30
-0
lines changed Expand file tree Collapse file tree 2 files changed +30
-0
lines changed Original file line number Diff line number Diff line change @@ -54,5 +54,6 @@ chore_read_nobrowserglobals_from_global_not_process.patch
54
54
chore_use_v8_inspector_js_protocol_to_find_pdl_file.patch
55
55
chore_split_createenvironment_into_createenvironment_and.patch
56
56
fix_set_uptime_offset_in_correct_init_method.patch
57
+ fix_enable_worker_threads.patch
57
58
fsevents-stop-using-fsevents-to-watch-files.patch
58
59
fsevents-regression-in-watching.patch
Original file line number Diff line number Diff line change
1
+ From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
2
+ From: Shelley Vohr <shelley.vohr@gmail.com>
3
+ Date: Thu, 3 Oct 2019 19:03:30 +0200
4
+ Subject: fix: enable worker_threads
5
+
6
+ Electron sets NODE_USE_V8_PLATFORM to false, because Electron
7
+ initializes the v8 platform itself and Node.js worker thread
8
+ initialization relies on the platform it uses having been set inside
9
+ code guarded by NODE_USE_V8_PLATFORM.
10
+
11
+ This commit fixes this problem by changing node_worker to use the three-arg
12
+ implementation of `NewIsolate` to prevent it trying to use a possibly-null ptr.
13
+
14
+ diff --git a/src/node_worker.cc b/src/node_worker.cc
15
+ index 8f97f5c351..2bfbb28e61 100644
16
+ --- a/src/node_worker.cc
17
+ +++ b/src/node_worker.cc
18
+ @@ -112,7 +112,10 @@ class WorkerThreadData {
19
+ array_buffer_allocator_(ArrayBufferAllocator::Create()) {
20
+ CHECK_EQ(uv_loop_init(&loop_), 0);
21
+
22
+ - Isolate* isolate = NewIsolate(array_buffer_allocator_.get(), &loop_);
23
+ + Isolate* isolate = NewIsolate(
24
+ + array_buffer_allocator_.get(),
25
+ + &loop_,
26
+ + w->platform_);
27
+ CHECK_NOT_NULL(isolate);
28
+
29
+ {
You can’t perform that action at this time.
0 commit comments