Commit fa70327
authored
lib: return undefined for localStorage without file
Make localStorage return undefined and emit a warning when
--localstorage-file is not provided. Mark the property as
non-enumerable to avoid breaking {...globalThis}.
Fixes: #60303
PR-URL: #61333
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>1 parent 7698480 commit fa70327Copy full SHA for fa70327
5 files changed
+58-22Lines changed: 58 additions & 22 deletions
File tree
Expand file treeCollapse file tree
Open diff view settings
Filter options
- lib/internal
- process
- test
- common
- parallel
Expand file treeCollapse file tree
Open diff view settings
Collapse file
lib/internal/process/pre_execution.js
Copy file name to clipboardExpand all lines: lib/internal/process/pre_execution.js+19-1Lines changed: 19 additions & 1 deletion
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
404 | 404 | |
405 | 405 | |
406 | 406 | |
| 407 | + |
| 408 | + |
| 409 | + |
| 410 | + |
| 411 | + |
| 412 | + |
| 413 | + |
| 414 | + |
| 415 | + |
| 416 | + |
| 417 | + |
| 418 | + |
| 419 | + |
| 420 | + |
| 421 | + |
| 422 | + |
| 423 | + |
| 424 | + |
407 | 425 | |
408 | | - |
| 426 | + |
409 | 427 | |
410 | 428 | |
411 | 429 | |
|
Collapse file
+16-11Lines changed: 16 additions & 11 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
3 | 3 | |
4 | 4 | |
5 | 5 | |
6 | | - |
7 | 6 | |
8 | 7 | |
9 | 8 | |
| ||
12 | 11 | |
13 | 12 | |
14 | 13 | |
| 14 | + |
| 15 | + |
| 16 | + |
| 17 | + |
| 18 | + |
15 | 19 | |
16 | 20 | |
17 | 21 | |
18 | 22 | |
19 | 23 | |
20 | 24 | |
21 | | - |
| 25 | + |
22 | 26 | |
23 | 27 | |
24 | | - |
25 | | - |
26 | | - |
27 | | - |
28 | | - |
29 | | - |
30 | | - |
31 | | - |
| 28 | + |
| 29 | + |
| 30 | + |
| 31 | + |
| 32 | + |
| 33 | + |
| 34 | + |
| 35 | + |
| 36 | + |
32 | 37 | |
33 | 38 | |
34 | | - |
| 39 | + |
35 | 40 | |
36 | 41 | |
37 | 42 | |
|
Collapse file
+4-5Lines changed: 4 additions & 5 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
71 | 71 | |
72 | 72 | |
73 | 73 | |
74 | | - |
75 | | - |
76 | | - |
77 | | - |
78 | | - |
| 74 | + |
| 75 | + |
| 76 | + |
| 77 | + |
79 | 78 | |
80 | 79 | |
81 | 80 | |
|
Collapse file
test/parallel/test-global.js
Copy file name to clipboardExpand all lines: test/parallel/test-global.js+6-1Lines changed: 6 additions & 1 deletion
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
61 | 61 | |
62 | 62 | |
63 | 63 | |
64 | | - |
| 64 | + |
| 65 | + |
| 66 | + |
| 67 | + |
| 68 | + |
| 69 | + |
65 | 70 | |
66 | 71 | |
67 | 72 | |
|
Collapse file
test/parallel/test-webstorage.js
Copy file name to clipboardExpand all lines: test/parallel/test-webstorage.js+13-4Lines changed: 13 additions & 4 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
41 | 41 | |
42 | 42 | |
43 | 43 | |
44 | | - |
| 44 | + |
45 | 45 | |
46 | | - |
| 46 | + |
47 | 47 | |
48 | | - |
| 48 | + |
49 | 49 | |
50 | | - |
| 50 | + |
| 51 | + |
| 52 | + |
| 53 | + |
| 54 | + |
| 55 | + |
| 56 | + |
| 57 | + |
| 58 | + |
| 59 | + |
51 | 60 | |
52 | 61 | |
53 | 62 | |
|
0 commit comments