Commit ea08d7f
authored
Validate source before compiling CJS module. module: fix ERR_INTERNAL_ASSERTION in CJS module loading
Fixes: #60401
The loadCJSModule function was not properly validating source
content before passing it to compileFunctionForCJSLoader, causing internal assertions when source was null or undefined.
This change adds proper source validation and throws a meaningful ERR_INVALID_RETURN_PROPERTY_VALUE error instead of failing with an internal assertion.1 parent 9be412f commit ea08d7f
1 file changed
+14
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
124 | 124 | | |
125 | 125 | | |
126 | 126 | | |
127 | | - | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
128 | 139 | | |
| 140 | + | |
| 141 | + | |
129 | 142 | | |
130 | 143 | | |
131 | 144 | | |
| |||
0 commit comments