Commit 229ce86
committed
lib: only build the ESM facade for builtins when they are needed
We previously build the ESM facade for builtins even when they
are not directly import'ed (which rarely happens for internal
builtins as that requires --expose-internals). This patch removes
the eager generation to avoid the overhead and the extra
promises created in facade building when it's not reqested by the user.
When the facade is needed the ESM loader that can be requested
it in the translator on-demand.
Drive-by: set the ModuleWrap prototype to null in the built-in
snapshot.1 parent 9448c61 commit 229ce86
1 file changed
+3
-5
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
198 | 198 | | |
199 | 199 | | |
200 | 200 | | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
201 | 204 | | |
202 | 205 | | |
203 | 206 | | |
| |||
338 | 341 | | |
339 | 342 | | |
340 | 343 | | |
341 | | - | |
342 | | - | |
343 | 344 | | |
344 | 345 | | |
345 | 346 | | |
346 | 347 | | |
347 | 348 | | |
348 | | - | |
349 | | - | |
350 | | - | |
351 | 349 | | |
352 | 350 | | |
353 | 351 | | |
| |||
0 commit comments