Commit 5782ec2
module: don't cache uninitialized builtins
Don't cache the exported values of fully uninitialized builtins.
This works by adding an additional `loading` flag that is only
active during initial loading of an internal module and checking
that either the module is fully loaded or is in that state before
using its cached value.
This has the effect that builtins modules which could not be loaded
(e.g. because compilation failed due to missing stack space) can be
loaded at a later point.
Fixes: #6899
Ref: #6899
PR-URL: #6907
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>1 parent b9dfdfe commit 5782ec2Copy full SHA for 5782ec2
File tree
Expand file treeCollapse file tree
3 files changed
+36
-7
lines changedOpen diff view settings
Filter options
- src
- test/message
Expand file treeCollapse file tree
3 files changed
+36
-7
lines changedOpen diff view settings
Collapse file
+13-7Lines changed: 13 additions & 7 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
877 | 877 | |
878 | 878 | |
879 | 879 | |
| 880 | + |
880 | 881 | |
881 | 882 | |
882 | 883 | |
| ||
888 | 889 | |
889 | 890 | |
890 | 891 | |
891 | | - |
| 892 | + |
892 | 893 | |
893 | 894 | |
894 | 895 | |
| ||
952 | 953 | |
953 | 954 | |
954 | 955 | |
955 | | - |
956 | | - |
957 | | - |
958 | | - |
959 | | - |
| 956 | + |
| 957 | + |
| 958 | + |
| 959 | + |
| 960 | + |
| 961 | + |
| 962 | + |
960 | 963 | |
961 | | - |
| 964 | + |
| 965 | + |
| 966 | + |
| 967 | + |
962 | 968 | |
963 | 969 | |
964 | 970 | |
|
Collapse file
test/message/console_low_stack_space.js
Copy file name to clipboard+22Lines changed: 22 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 | + |
| 22 | + |
Collapse file
test/message/console_low_stack_space.out
Copy file name to clipboard+1Lines changed: 1 addition & 0 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
| 1 | + |
0 commit comments