Commit ccc76bb
src: simplify embedder entry point execution
Previously we wrapped the embedder entry point callback into a
binding and then invoke the binding from JS land which was a bit
convoluted. Now we just call it directly from C++.
The main scripts that needed to tail call the embedder callback now
return the arguments in an array so that the C++ land can extract
the arguments and pass them to the callback. We also set
`PauseOnNextJavascriptStatement()` for --inspect-brk and mark
the bootstrap complete milestone directly in C++ for these
execution modes.
PR-URL: #51557
Reviewed-By: Daniel Lemire <daniel@lemire.me>
Reviewed-By: Chengzhong Wu <legendecas@gmail.com>1 parent 275cea0 commit ccc76bbCopy full SHA for ccc76bb
File tree
Expand file treeCollapse file tree
6 files changed
+54
-60
lines changedOpen diff view settings
Filter options
- lib/internal/main
- src
Expand file treeCollapse file tree
6 files changed
+54
-60
lines changedOpen diff view settings
Collapse file
lib/internal/main/embedding.js
Copy file name to clipboard+1-4Lines changed: 1 addition & 4 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
1 | 1 | |
2 | 2 | |
3 | 3 | |
4 | | - |
5 | 4 | |
6 | 5 | |
7 | 6 | |
8 | 7 | |
9 | | - |
10 | 8 | |
11 | 9 | |
12 | | - |
13 | 10 | |
14 | 11 | |
15 | 12 | |
16 | 13 | |
17 | 14 | |
18 | | - |
| 15 | + |
Collapse file
lib/internal/main/mksnapshot.js
Copy file name to clipboardExpand all lines: lib/internal/main/mksnapshot.js+2-13Lines changed: 2 additions & 13 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
11 | 11 | |
12 | 12 | |
13 | 13 | |
14 | | - |
15 | 14 | |
16 | 15 | |
17 | 16 | |
| ||
20 | 19 | |
21 | 20 | |
22 | 21 | |
23 | | - |
24 | | - |
25 | | - |
26 | 22 | |
27 | 23 | |
28 | 24 | |
| ||
179 | 175 | |
180 | 176 | |
181 | 177 | |
182 | | - |
183 | | - |
184 | 178 | |
185 | 179 | |
186 | 180 | |
187 | 181 | |
188 | | - |
189 | | - |
190 | | - |
191 | | - |
192 | | - |
193 | | - |
| 182 | + |
194 | 183 | |
195 | 184 | |
196 | | - |
| 185 | + |
Collapse file
-8Lines changed: 0 additions & 8 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
430 | 430 | |
431 | 431 | |
432 | 432 | |
433 | | - |
434 | | - |
435 | | - |
436 | | - |
437 | | - |
438 | | - |
439 | | - |
440 | | - |
441 | 433 | |
442 | 434 | |
443 | 435 | |
|
Collapse file
-4Lines changed: 0 additions & 4 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
999 | 999 | |
1000 | 1000 | |
1001 | 1001 | |
1002 | | - |
1003 | | - |
1004 | | - |
1005 | 1002 | |
1006 | 1003 | |
1007 | 1004 | |
| ||
1212 | 1209 | |
1213 | 1210 | |
1214 | 1211 | |
1215 | | - |
1216 | 1212 | |
1217 | 1213 | |
1218 | 1214 | |
|
Collapse file
+51-9Lines changed: 51 additions & 9 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
131 | 131 | |
132 | 132 | |
133 | 133 | |
| 134 | + |
| 135 | + |
134 | 136 | |
| 137 | + |
135 | 138 | |
136 | 139 | |
137 | 140 | |
| ||
278 | 281 | |
279 | 282 | |
280 | 283 | |
| 284 | + |
| 285 | + |
| 286 | + |
| 287 | + |
| 288 | + |
| 289 | + |
| 290 | + |
| 291 | + |
| 292 | + |
| 293 | + |
| 294 | + |
| 295 | + |
| 296 | + |
| 297 | + |
| 298 | + |
| 299 | + |
| 300 | + |
| 301 | + |
| 302 | + |
| 303 | + |
| 304 | + |
| 305 | + |
| 306 | + |
281 | 307 | |
282 | 308 | |
283 | 309 | |
284 | 310 | |
285 | 311 | |
286 | 312 | |
287 | 313 | |
| 314 | + |
| 315 | + |
288 | 316 | |
289 | 317 | |
290 | | - |
291 | | - |
292 | | - |
293 | | - |
294 | | - |
295 | 318 | |
296 | | - |
297 | | - |
298 | | - |
| 319 | + |
| 320 | + |
| 321 | + |
| 322 | + |
| 323 | + |
| 324 | + |
| 325 | + |
| 326 | + |
| 327 | + |
| 328 | + |
| 329 | + |
| 330 | + |
| 331 | + |
| 332 | + |
| 333 | + |
| 334 | + |
| 335 | + |
| 336 | + |
| 337 | + |
| 338 | + |
299 | 339 | |
300 | | - |
| 340 | + |
| 341 | + |
| 342 | + |
301 | 343 | |
302 | 344 | |
303 | 345 | |
|
Collapse file
-22Lines changed: 0 additions & 22 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
41 | 41 | |
42 | 42 | |
43 | 43 | |
44 | | - |
45 | 44 | |
46 | 45 | |
47 | 46 | |
| ||
1411 | 1410 | |
1412 | 1411 | |
1413 | 1412 | |
1414 | | - |
1415 | | - |
1416 | | - |
1417 | | - |
1418 | | - |
1419 | | - |
1420 | | - |
1421 | | - |
1422 | | - |
1423 | | - |
1424 | | - |
1425 | | - |
1426 | | - |
1427 | | - |
1428 | | - |
1429 | | - |
1430 | | - |
1431 | | - |
1432 | | - |
1433 | 1413 | |
1434 | 1414 | |
1435 | 1415 | |
| ||
1553 | 1533 | |
1554 | 1534 | |
1555 | 1535 | |
1556 | | - |
1557 | 1536 | |
1558 | 1537 | |
1559 | 1538 | |
| ||
1566 | 1545 | |
1567 | 1546 | |
1568 | 1547 | |
1569 | | - |
1570 | 1548 | |
1571 | 1549 | |
1572 | 1550 | |
|
0 commit comments