-
Notifications
You must be signed in to change notification settings - Fork 30k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Module.builtinModules should not include "inspector" when in a worker #22676
Comments
I’m not sure there’s much to do here, given that Workers are still experimental and #21364 is pretty close to landing. |
Feel free to close when it lands. It's something to keep in mind for future additions though. Having to require the module in a try-catch isn't great (unintended code execution, gross-try-catch, etc.). Update: Do we know if the other case, |
Also, is there a reason why there are |
@mscdex anything that can be |
Related to #22769. |
I'm closing because #21364 landed. If that isn't right and this should remain open, by all means, correct my error and re-open this! |
The recommended way to sniff for "inspector" support without using
process.binding()
has been to useModule.builtinModules
. However, when in a worker theModule.builtinModules
array still contains "inspector" resulting in an error being thrown when the module is required.node/lib/inspector.js
Lines 17 to 18 in e570ae7
The text was updated successfully, but these errors were encountered: