Skip to content
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

src: use `internalBinding('config').hasInspector` in JS land #25291

Closed
wants to merge 2 commits into from

Conversation

@joyeecheung
Copy link
Member

commented Dec 31, 2018

Instead of process.config.variables.v8_enable_inspector
which depends on the variable name in gyp files, or detecting
internalBinding('inspector').Connection.

Checklist
  • make -j4 test (UNIX), or vcbuild test (Windows) passes
  • commit message follows commit guidelines
@joyeecheung

This comment has been minimized.

Copy link
Member Author

commented Dec 31, 2018

@jdalton

This comment has been minimized.

Copy link
Member

commented Dec 31, 2018

What I liked about process.config.variables.v8_enable_inspector is that it's also a user accessible way to detect if the inspector is enabled. Instead of moving to an internal solution it would be rad to expose this in a more user-friendly way.

@lpinca
lpinca approved these changes Jan 1, 2019
@@ -33,7 +33,7 @@ const cannotUseCache = [

// Skip modules that cannot be required when they are not
// built into the binary.
if (process.config.variables.v8_enable_inspector !== 1) {
if (hasInspector) {

This comment has been minimized.

Copy link
@lpinca

lpinca Jan 1, 2019

Member

I think this should be !hasInspector

@joyeecheung

This comment has been minimized.

Copy link
Member Author

commented Jan 1, 2019

@jdalton I personally would not mind if there is an alias for internalBinding('config').hasInspector on process.features, but it would be a separate bikeshed about whether process.features should be deprecated in favor of something newer and shinier and what that might be ¯\(ツ)

@jasnell
jasnell approved these changes Jan 1, 2019
joyeecheung added 2 commits Dec 26, 2018
src: use `internalBinding('config').hasInspector` in JS land
Instead of `process.config.variables.v8_enable_inspector`
which depends on the variable name in gyp files, or detecting
`internalBinding('inspector').Connection`.

@joyeecheung joyeecheung force-pushed the joyeecheung:has-inspector branch from 89178d2 to b249b07 Jan 2, 2019

@joyeecheung

This comment has been minimized.

Copy link
Member Author

commented Jan 2, 2019

@joyeecheung

This comment has been minimized.

Copy link
Member Author

commented Jan 2, 2019

SmartOS ran out of memory. Resume: https://ci.nodejs.org/job/node-test-pull-request/19912/

@joyeecheung

This comment has been minimized.

Copy link
Member Author

commented Jan 4, 2019

Landed in b22c86e

@joyeecheung joyeecheung closed this Jan 4, 2019

joyeecheung added a commit that referenced this pull request Jan 4, 2019
src: use `internalBinding('config').hasInspector` in JS land
Instead of `process.config.variables.v8_enable_inspector`
which depends on the variable name in gyp files, or detecting
`internalBinding('inspector').Connection`.

PR-URL: #25291
Reviewed-By: Tiancheng "Timothy" Gu <timothygu99@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
@joyeecheung

This comment has been minimized.

Copy link
Member Author

commented Jan 4, 2019

Opened #25343 about process.features

@addaleax

This comment has been minimized.

Copy link
Member

commented Jan 5, 2019

Should this be backported to v11.x-staging? If yes please follow the guide and raise a backport PR, if not let me know or add the dont-land-on label.

sam-github added a commit to sam-github/node that referenced this pull request Jan 6, 2019
src: use `internalBinding('config').hasInspector` in JS land
Instead of `process.config.variables.v8_enable_inspector`
which depends on the variable name in gyp files, or detecting
`internalBinding('inspector').Connection`.

PR-URL: nodejs#25291
Reviewed-By: Tiancheng "Timothy" Gu <timothygu99@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>

@BridgeAR BridgeAR added this to Backport requested in v11.x Jan 10, 2019

refack added a commit to refack/node that referenced this pull request Jan 14, 2019
src: use `internalBinding('config').hasInspector` in JS land
Instead of `process.config.variables.v8_enable_inspector`
which depends on the variable name in gyp files, or detecting
`internalBinding('inspector').Connection`.

PR-URL: nodejs#25291
Reviewed-By: Tiancheng "Timothy" Gu <timothygu99@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
addaleax added a commit that referenced this pull request Jan 15, 2019
src: use `internalBinding('config').hasInspector` in JS land
Instead of `process.config.variables.v8_enable_inspector`
which depends on the variable name in gyp files, or detecting
`internalBinding('inspector').Connection`.

PR-URL: #25291
Reviewed-By: Tiancheng "Timothy" Gu <timothygu99@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
@BridgeAR BridgeAR referenced this pull request Jan 16, 2019
BridgeAR added a commit to BridgeAR/node that referenced this pull request Jan 16, 2019
src: use `internalBinding('config').hasInspector` in JS land
Instead of `process.config.variables.v8_enable_inspector`
which depends on the variable name in gyp files, or detecting
`internalBinding('inspector').Connection`.

PR-URL: nodejs#25291
Reviewed-By: Tiancheng "Timothy" Gu <timothygu99@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
BridgeAR added a commit to BridgeAR/node that referenced this pull request Jan 17, 2019
src: use `internalBinding('config').hasInspector` in JS land
Instead of `process.config.variables.v8_enable_inspector`
which depends on the variable name in gyp files, or detecting
`internalBinding('inspector').Connection`.

PR-URL: nodejs#25291
Reviewed-By: Tiancheng "Timothy" Gu <timothygu99@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
@MylesBorins MylesBorins referenced this pull request Jan 24, 2019

@targos targos removed this from Backport requested in v11.x Jan 30, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
7 participants
You can’t perform that action at this time.