mirror of
https://github.com/electron/electron.git
synced 2026-01-26 15:58:07 -05:00
Previously we loaded both fs and child_process and then hooked into the returned value, relying on the module cache to keep our modifications and give them to everyone. Loading child_process took in excess of 20ms though so instead of loading it and then hooking in. We intercept all Module load requests, and when the first one for `child_process` comes in, we wrap the appropriate methods and then never touch it again.