Commit 3d2988e
lib: do not crash using workers with disabled shared array buffers
This allows the repl to function normally while using the
`--no-harmony-sharedarraybuffer` V8 flag.
It also fixes using workers while using the
`--no-harmony-atomics` V8 flag.
Fixes: #39717
Signed-off-by: Ruben Bridgewater <ruben@bridgewater.de>
Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>
PR-URL: #41023
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>1 parent 106ac53 commit 3d2988eCopy full SHA for 3d2988e
File tree
Expand file treeCollapse file tree
5 files changed
+73
-17
lines changedOpen diff view settings
Filter options
- benchmark/worker
- lib/internal
- main
- test/parallel
Expand file treeCollapse file tree
5 files changed
+73
-17
lines changedOpen diff view settings
Collapse file
benchmark/worker/atomics-wait.js
Copy file name to clipboardExpand all lines: benchmark/worker/atomics-wait.js+8-1Lines changed: 8 additions & 1 deletion
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
1 | 1 | |
2 | | - |
| 2 | + |
| 3 | + |
| 4 | + |
| 5 | + |
| 6 | + |
| 7 | + |
| 8 | + |
| 9 | + |
3 | 10 | |
4 | 11 | |
5 | 12 | |
|
Collapse file
lib/internal/main/worker_thread.js
Copy file name to clipboardExpand all lines: lib/internal/main/worker_thread.js+20-15Lines changed: 20 additions & 15 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
10 | 10 | |
11 | 11 | |
12 | 12 | |
13 | | - |
| 13 | + |
| 14 | + |
| 15 | + |
| 16 | + |
14 | 17 | |
15 | 18 | |
16 | 19 | |
| ||
106 | 109 | |
107 | 110 | |
108 | 111 | |
109 | | - |
110 | | - |
111 | | - |
112 | | - |
113 | | - |
114 | | - |
115 | | - |
116 | | - |
117 | | - |
| 112 | + |
| 113 | + |
| 114 | + |
| 115 | + |
| 116 | + |
| 117 | + |
| 118 | + |
| 119 | + |
| 120 | + |
| 121 | + |
| 122 | + |
| 123 | + |
| 124 | + |
118 | 125 | |
119 | | - |
120 | | - |
121 | | - |
122 | | - |
123 | | - |
| 126 | + |
| 127 | + |
| 128 | + |
124 | 129 | |
125 | 130 | |
126 | 131 | |
|
Collapse file
+3-1Lines changed: 3 additions & 1 deletion
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
95 | 95 | |
96 | 96 | |
97 | 97 | |
98 | | - |
| 98 | + |
| 99 | + |
| 100 | + |
99 | 101 | |
100 | 102 | |
101 | 103 | |
|
Collapse file
test/parallel/test-worker-no-atomics.js
Copy file name to clipboard+21Lines changed: 21 additions & 0 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
| 1 | + |
| 2 | + |
| 3 | + |
| 4 | + |
| 5 | + |
| 6 | + |
| 7 | + |
| 8 | + |
| 9 | + |
| 10 | + |
| 11 | + |
| 12 | + |
| 13 | + |
| 14 | + |
| 15 | + |
| 16 | + |
| 17 | + |
| 18 | + |
| 19 | + |
| 20 | + |
| 21 | + |
Collapse file
test/parallel/test-worker-no-sab.js
Copy file name to clipboard+21Lines changed: 21 additions & 0 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
| 1 | + |
| 2 | + |
| 3 | + |
| 4 | + |
| 5 | + |
| 6 | + |
| 7 | + |
| 8 | + |
| 9 | + |
| 10 | + |
| 11 | + |
| 12 | + |
| 13 | + |
| 14 | + |
| 15 | + |
| 16 | + |
| 17 | + |
| 18 | + |
| 19 | + |
| 20 | + |
| 21 | + |
0 commit comments