Commit e83dcde
worker: allow URL in Worker constructor
The explicit goal is to let users use `import.meta.url` to
re-load thecurrent module inside a Worker instance.
Fixes: #30780
PR-URL: #31664
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Gus Caplan <me@gus.host>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>1 parent 597bcb5 commit e83dcdeCopy full SHA for e83dcde
File tree
Expand file treeCollapse file tree
8 files changed
+104
-20
lines changedOpen diff view settings
Filter options
- doc/api
- lib/internal
- test/parallel
Expand file treeCollapse file tree
8 files changed
+104
-20
lines changedOpen diff view settings
Collapse file
+11-5Lines changed: 11 additions & 5 deletions
- Display the source diff
- Display the rich diff
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
513 | 513 | |
514 | 514 | |
515 | 515 | |
| 516 | + |
| 517 | + |
| 518 | + |
| 519 | + |
516 | 520 | |
517 | 521 | |
518 | 522 | |
| ||
521 | 525 | |
522 | 526 | |
523 | 527 | |
524 | | - |
525 | | - |
526 | | - |
| 528 | + |
| 529 | + |
| 530 | + |
| 531 | + |
527 | 532 | |
528 | 533 | |
529 | 534 | |
| ||
536 | 541 | |
537 | 542 | |
538 | 543 | |
539 | | - |
540 | | - |
| 544 | + |
| 545 | + |
| 546 | + |
541 | 547 | |
542 | 548 | |
543 | 549 | |
|
Collapse file
+8-3Lines changed: 8 additions & 3 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
1391 | 1391 | |
1392 | 1392 | |
1393 | 1393 | |
1394 | | - |
1395 | | - |
1396 | | - |
| 1394 | + |
| 1395 | + |
| 1396 | + |
| 1397 | + |
| 1398 | + |
| 1399 | + |
| 1400 | + |
| 1401 | + |
1397 | 1402 | |
1398 | 1403 | |
1399 | 1404 | |
|
Collapse file
+8-4Lines changed: 8 additions & 4 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
1348 | 1348 | |
1349 | 1349 | |
1350 | 1350 | |
1351 | | - |
1352 | | - |
| 1351 | + |
1353 | 1352 | |
1354 | 1353 | |
1355 | 1354 | |
| ||
1396 | 1395 | |
1397 | 1396 | |
1398 | 1397 | |
| 1398 | + |
| 1399 | + |
| 1400 | + |
| 1401 | + |
| 1402 | + |
1399 | 1403 | |
1400 | | - |
1401 | | - |
| 1404 | + |
1402 | 1405 | |
1403 | 1406 | |
1404 | 1407 | |
| ||
1431 | 1434 | |
1432 | 1435 | |
1433 | 1436 | |
| 1437 | + |
1434 | 1438 | |
1435 | 1439 | |
1436 | 1440 | |
|
Collapse file
+27-7Lines changed: 27 additions & 7 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
27 | 27 | |
28 | 28 | |
29 | 29 | |
| 30 | + |
30 | 31 | |
31 | | - |
32 | 32 | |
33 | 33 | |
34 | 34 | |
| ||
45 | 45 | |
46 | 46 | |
47 | 47 | |
48 | | - |
| 48 | + |
49 | 49 | |
50 | 50 | |
51 | 51 | |
| ||
86 | 86 | |
87 | 87 | |
88 | 88 | |
89 | | - |
90 | 89 | |
91 | 90 | |
92 | 91 | |
| ||
99 | 98 | |
100 | 99 | |
101 | 100 | |
102 | | - |
103 | | - |
| 101 | + |
| 102 | + |
| 103 | + |
| 104 | + |
| 105 | + |
| 106 | + |
| 107 | + |
| 108 | + |
| 109 | + |
| 110 | + |
| 111 | + |
| 112 | + |
| 113 | + |
| 114 | + |
| 115 | + |
| 116 | + |
| 117 | + |
| 118 | + |
| 119 | + |
| 120 | + |
| 121 | + |
| 122 | + |
| 123 | + |
| 124 | + |
| 125 | + |
104 | 126 | |
105 | 127 | |
106 | | - |
107 | 128 | |
108 | 129 | |
109 | 130 | |
| ||
125 | 146 | |
126 | 147 | |
127 | 148 | |
128 | | - |
129 | 149 | |
130 | 150 | |
131 | 151 | |
|
Collapse file
test/parallel/test-worker-type-check.js
Copy file name to clipboardExpand all lines: test/parallel/test-worker-type-check.js+2-1Lines changed: 2 additions & 1 deletion
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
20 | 20 | |
21 | 21 | |
22 | 22 | |
23 | | - |
| 23 | + |
| 24 | + |
24 | 25 | |
25 | 26 | |
26 | 27 | |
|
Collapse file
test/parallel/test-worker-unsupported-eval-on-url.mjs
Copy file name to clipboard+6Lines changed: 6 additions & 0 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
| 1 | + |
| 2 | + |
| 3 | + |
| 4 | + |
| 5 | + |
| 6 | + |
Collapse file
test/parallel/test-worker-unsupported-path.js
Copy file name to clipboardExpand all lines: test/parallel/test-worker-unsupported-path.js+24Lines changed: 24 additions & 0 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
13 | 13 | |
14 | 14 | |
15 | 15 | |
| 16 | + |
16 | 17 | |
17 | 18 | |
18 | 19 | |
| ||
26 | 27 | |
27 | 28 | |
28 | 29 | |
| 30 | + |
| 31 | + |
| 32 | + |
| 33 | + |
| 34 | + |
| 35 | + |
| 36 | + |
| 37 | + |
| 38 | + |
| 39 | + |
| 40 | + |
| 41 | + |
| 42 | + |
| 43 | + |
| 44 | + |
| 45 | + |
| 46 | + |
| 47 | + |
| 48 | + |
| 49 | + |
| 50 | + |
| 51 | + |
| 52 | + |
Collapse file
test/parallel/test-worker.mjs
Copy file name to clipboard+18Lines changed: 18 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 | + |
0 commit comments