Commit 44f64f1
deps: V8: backport bef0d9c1bc90
Original commit message:
[api] Add V8::GetWasmMemoryReservationSizeInBytes()
When the system does not have enough virtual memory for the wasm
cage, installing the trap handler would cause any code allocating
wasm memory to throw. Therefore it's useful for the embedder to
know when the system doesn't have enough virtual address space
to allocate enough wasm cages and in that case, skip the
trap handler installation so that wasm code can at least work
(even not at the maximal performance).
Node.js previously has a command line option
--disable-wasm-trap-handler to fully disable trap-based bound checks,
this new API would allow it to adapt automatically while keeping the
optimization in the happy path, since it's not always possible for
end users to opt-into disabling trap-based bound checks (for example,
when a VS Code Server is loaded in a remote server for debugging).
Refs: #62132
Refs: microsoft/vscode#251777
Change-Id: I345c076af2b2b47700e5716b49c3133fdf8a0981
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/7638233
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Commit-Queue: Joyee Cheung <joyee@igalia.com>
Reviewed-by: Clemens Backes <clemensb@chromium.org>
Cr-Commit-Position: refs/heads/main@{#105702}
Refs: v8/v8@bef0d9c
Co-authored-by: Joyee Cheung <joyeec9h3@gmail.com>
Refs: microsoft/vscode#251777
Refs: https://chromium-review.googlesource.com/c/v8/v8/+/7638233
PR-URL: #61898
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Filip Skokan <panva.ip@gmail.com>
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com>
Reviewed-By: Chengzhong Wu <legendecas@gmail.com>
(cherry picked from commit 13fb819)1 parent 1f8f288 commit 44f64f1Copy full SHA for 44f64f1
6 files changed
+94-21Lines changed: 94 additions & 21 deletions
File tree
Expand file treeCollapse file tree
Open diff view settings
Filter options
- deps/v8
- include
- src
- api
- objects
- test/unittests/api
Expand file treeCollapse file tree
Open diff view settings
Collapse file
+1-1Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
38 | 38 | |
39 | 39 | |
40 | 40 | |
41 | | - |
| 41 | + |
42 | 42 | |
43 | 43 | |
44 | 44 | |
|
Collapse file
deps/v8/include/v8-initialization.h
Copy file name to clipboardExpand all lines: deps/v8/include/v8-initialization.h+29Lines changed: 29 additions & 0 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
253 | 253 | |
254 | 254 | |
255 | 255 | |
| 256 | + |
| 257 | + |
| 258 | + |
| 259 | + |
| 260 | + |
| 261 | + |
| 262 | + |
| 263 | + |
| 264 | + |
| 265 | + |
| 266 | + |
| 267 | + |
| 268 | + |
| 269 | + |
| 270 | + |
| 271 | + |
| 272 | + |
| 273 | + |
| 274 | + |
| 275 | + |
| 276 | + |
| 277 | + |
| 278 | + |
| 279 | + |
| 280 | + |
| 281 | + |
| 282 | + |
| 283 | + |
| 284 | + |
256 | 285 | |
257 | 286 | |
258 | 287 | |
|
Collapse file
+21Lines changed: 21 additions & 0 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
152 | 152 | |
153 | 153 | |
154 | 154 | |
| 155 | + |
155 | 156 | |
156 | 157 | |
157 | 158 | |
| ||
6358 | 6359 | |
6359 | 6360 | |
6360 | 6361 | |
| 6362 | + |
| 6363 | + |
| 6364 | + |
| 6365 | + |
| 6366 | + |
| 6367 | + |
| 6368 | + |
| 6369 | + |
| 6370 | + |
| 6371 | + |
| 6372 | + |
| 6373 | + |
| 6374 | + |
| 6375 | + |
| 6376 | + |
| 6377 | + |
| 6378 | + |
| 6379 | + |
| 6380 | + |
| 6381 | + |
6361 | 6382 | |
6362 | 6383 | |
6363 | 6384 | |
|
Collapse file
deps/v8/src/objects/backing-store.cc
Copy file name to clipboardExpand all lines: deps/v8/src/objects/backing-store.cc+22-20Lines changed: 22 additions & 20 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
51 | 51 | |
52 | 52 | |
53 | 53 | |
54 | | - |
55 | | - |
| 54 | + |
| 55 | + |
| 56 | + |
| 57 | + |
| 58 | + |
| 59 | + |
| 60 | + |
| 61 | + |
| 62 | + |
| 63 | + |
| 64 | + |
| 65 | + |
| 66 | + |
| 67 | + |
| 68 | + |
| 69 | + |
| 70 | + |
| 71 | + |
| 72 | + |
56 | 73 | |
57 | 74 | |
58 | 75 | |
| ||
73 | 90 | |
74 | 91 | |
75 | 92 | |
76 | | - |
77 | | - |
78 | | - |
79 | | - |
80 | | - |
81 | | - |
82 | | - |
83 | | - |
84 | | - |
85 | | - |
86 | | - |
87 | | - |
88 | | - |
89 | | - |
90 | | - |
91 | 93 | |
92 | 94 | |
93 | 95 | |
| ||
169 | 171 | |
170 | 172 | |
171 | 173 | |
172 | | - |
| 174 | + |
173 | 175 | |
174 | 176 | |
175 | 177 | |
| ||
319 | 321 | |
320 | 322 | |
321 | 323 | |
322 | | - |
323 | | - |
| 324 | + |
| 325 | + |
324 | 326 | |
325 | 327 | |
326 | 328 | |
|
Collapse file
deps/v8/src/objects/backing-store.h
Copy file name to clipboardExpand all lines: deps/v8/src/objects/backing-store.h+5Lines changed: 5 additions & 0 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
202 | 202 | |
203 | 203 | |
204 | 204 | |
| 205 | + |
| 206 | + |
| 207 | + |
| 208 | + |
| 209 | + |
205 | 210 | |
206 | 211 | |
207 | 212 | |
|
Collapse file
deps/v8/test/unittests/api/api-wasm-unittest.cc
Copy file name to clipboardExpand all lines: deps/v8/test/unittests/api/api-wasm-unittest.cc+16Lines changed: 16 additions & 0 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
124 | 124 | |
125 | 125 | |
126 | 126 | |
| 127 | + |
| 128 | + |
| 129 | + |
| 130 | + |
| 131 | + |
| 132 | + |
| 133 | + |
| 134 | + |
| 135 | + |
| 136 | + |
| 137 | + |
| 138 | + |
| 139 | + |
| 140 | + |
| 141 | + |
| 142 | + |
127 | 143 | |
128 | 144 | |
129 | 145 | |
|
0 commit comments