-
-
Notifications
You must be signed in to change notification settings - Fork 33.9k
Closed
Labels
processIssues and PRs related to the process subsystem.Issues and PRs related to the process subsystem.
Description
- Version:
>=8 - Platform: All
- Subsystem:
internal/async_hooks
The Problem
require('natives').require('child_process')Running the above code causes a CHECK to fail resulting in node crashing. This can not be caught user side and for Electron applications such as VS Code there is no way for them to catch a bad module doing this before the process crashes.
This CHECK should probably be done JS side and throw a JS land error if JS is the cause. We can leave the CHECK in for those doing bad things in native land but for the average joe just running JS we shouldn't being crashing on them IMO. Happy to put together a patch for this if folks are OK with the "throw an error in JS" strategy.
Disclaimer
I am aware that natives is questionable / not really support. However IMO the crash shouldn't happen. As I mention above it should throw a JS side error or just handle it 😄
bpasero
Metadata
Metadata
Assignees
Labels
processIssues and PRs related to the process subsystem.Issues and PRs related to the process subsystem.