Commit ae7789a
committed
module: prevent race condition while combining import and require
This checks if any require calls have happened to the same file
during the file read. If that was the case, it'll return the same
module instead of creating a new instance.
PR-URL: #27674
Reviewed-By: Guy Bedford <guybedford@gmail.com>1 parent c574b57 commit ae7789aCopy full SHA for ae7789a
File tree
Expand file treeCollapse file tree
1 file changed
+10
-0
lines changedOpen diff view settings
Filter options
- lib/internal/modules/esm
Expand file treeCollapse file tree
1 file changed
+10
-0
lines changedOpen diff view settings
Collapse file
lib/internal/modules/esm/translators.js
Copy file name to clipboardExpand all lines: lib/internal/modules/esm/translators.js+10Lines changed: 10 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 | + |
127 | 137 | |
128 | 138 | |
129 | 139 | |
|
0 commit comments