| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Sorry, something went wrong.
| READONLY_PROPERTY(process, "_forceRepl", True(env->isolate())); | ||
| } | ||
|
|
||
| // -r,--require |
There was a problem hiding this comment.
Actually can you add a space here after the comma to be consistent with the other existing comments?
Sorry, something went wrong.
There was a problem hiding this comment.
done, thanks (also, fixed up the existing comment which did not use a space)
Sorry, something went wrong.
| READONLY_PROPERTY(process, "_debugWaitConnect", True(env->isolate())); | ||
| } | ||
|
|
||
| // --expose_internals,--expose-internals |
There was a problem hiding this comment.
Ditto
Sorry, something went wrong.
There was a problem hiding this comment.
In addition to the other issue mentioned, this should have a minimal test to verify that the property is set.
Sorry, something went wrong.
| // --expose_internals,--expose-internals | ||
| if (expose_internals) { | ||
| READONLY_PROPERTY(process, "_exposeInternals", True(env->isolate())); | ||
| } |
There was a problem hiding this comment.
Would prefer to use process.binding('config') for this rather than adding a new _-prefixed property off process
Sorry, something went wrong.
There was a problem hiding this comment.
PTAL, there is no new property created off of process (its deleted later). I'll add an assertion of that fact to the existing test.
Sorry, something went wrong.
| } | ||
|
|
||
| // --expose_internals, --expose-internals | ||
| // Note that this is not exposed as a process property, it is deleted when |
There was a problem hiding this comment.
@jasnell PTAL
Sorry, something went wrong.
There was a problem hiding this comment.
not sure the note is necessary, many setup properties do this
Sorry, something went wrong.
There was a problem hiding this comment.
I didn't think it was necessary either, but it confused @jasnell - James, what do you think?
Sorry, something went wrong.
There was a problem hiding this comment.
I want confused. I'm not fond of this pattern. Exposing via process.binding('config') is preferable to me.
Sorry, something went wrong.
| const assert = require('assert'); | ||
|
|
||
| assert.strictEqual(typeof require('internal/freelist').FreeList, 'function'); | ||
| assert(!('_exposeInternals' in process), 'no process property is leaked'); |
There was a problem hiding this comment.
@jasnell PTAL, I deliberately am making no change to the process properties (for cleanliness, and because it may potentically be backwards incompat, and also because its unnecessary, we can find if internal modules were exposed pretty easily by just trying to require one and seeing what happens, which is unusual to want to know, but possible).
Sorry, something went wrong.
There was a problem hiding this comment.
see
Lines 1219 to 1221 in 8460284
Sorry, something went wrong.
|
@sam-github This might also need a rebase after landing #12241. |
Sorry, something went wrong.
|
@jasnell what change? You saw the property is never visible, and unit test to that effect? You want the property put somewhere else for its brief lifetime? |
Sorry, something went wrong.
|
@jasnell I somehow missed your earlier comment, sorry. You actually want this exposed as a new config property? I don't think I'm on-board for that. I'm trying to factor out an oddity where process.argv is re-parsed after it was already parsed, which strikes me as undesireable, not add new APIs that haven't been requested. process.config in particular contains variables set by ./configure at this moment, it doesn't seem like the place to start adding command line arg flags. Maybe a process.options that contains the values of all the CLI options and flags would be an interesting feature, though I haven't seen that requested as a feature. |
Sorry, something went wrong.
|
No, not process.config, process.binding('config')... look at node_config.cc. It is an internal only mechanism for exposing configuration flags so that we can avoid hanging things off process and deleting them later. It was introduced specifically because process.config is unreliable and adding things to process is messy. |
Sorry, something went wrong.
|
OK, I'll go look |
Sorry, something went wrong.
Sorry, something went wrong.
A few of the CLI option values exposed as properties on the process object were missing a comment, fix this. PR-URL: #12245 Reviewed-By: Richard Lau <riclau@uk.ibm.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
bootstrap_node.js was directly parsing process.execArgv to see if internals should be exposed, even though the argv was already parsed by node. This is unusual and unnecessary, change it to set the option value from the parser onto the config binding. PR-URL: #12245 Reviewed-By: Richard Lau <riclau@uk.ibm.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
|
@sam-github when you merge multiple commits, could you still comment with Landed in HASH1 HASH2 as per the Collaborator Guide? |
Sorry, something went wrong.
|
Should this be backported to v6.x-staging? If yes please follow the guide and raise a backport PR, if no let me know or add the dont-land-on label. |
Sorry, something went wrong.
A few of the CLI option values exposed as properties on the process object were missing a comment, fix this. PR-URL: nodejs#12245 Reviewed-By: Richard Lau <riclau@uk.ibm.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
bootstrap_node.js was directly parsing process.execArgv to see if internals should be exposed, even though the argv was already parsed by node. This is unusual and unnecessary, change it to set the option value from the parser onto the config binding. PR-URL: nodejs#12245 Reviewed-By: Richard Lau <riclau@uk.ibm.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
A few of the CLI option values exposed as properties on the process object were missing a comment, fix this. Backport-PR-URL: #14483 PR-URL: #12245 Reviewed-By: Richard Lau <riclau@uk.ibm.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
bootstrap_node.js was directly parsing process.execArgv to see if internals should be exposed, even though the argv was already parsed by node. This is unusual and unnecessary, change it to set the option value from the parser onto the config binding. Backport-PR-URL: #14483 PR-URL: #12245 Reviewed-By: Richard Lau <riclau@uk.ibm.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
A few of the CLI option values exposed as properties on the process object were missing a comment, fix this. Backport-PR-URL: #14483 PR-URL: #12245 Reviewed-By: Richard Lau <riclau@uk.ibm.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
bootstrap_node.js was directly parsing process.execArgv to see if internals should be exposed, even though the argv was already parsed by node. This is unusual and unnecessary, change it to set the option value from the parser onto the config binding. Backport-PR-URL: #14483 PR-URL: #12245 Reviewed-By: Richard Lau <riclau@uk.ibm.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
A few of the CLI option values exposed as properties on the process object were missing a comment, fix this. Backport-PR-URL: #14483 PR-URL: #12245 Reviewed-By: Richard Lau <riclau@uk.ibm.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
bootstrap_node.js was directly parsing process.execArgv to see if internals should be exposed, even though the argv was already parsed by node. This is unusual and unnecessary, change it to set the option value from the parser onto the config binding. Backport-PR-URL: #14483 PR-URL: #12245 Reviewed-By: Richard Lau <riclau@uk.ibm.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
| Back | FazBrowse Home | New Git URL |
bootstrap_node.js was directly parsing process.execArgv to see if
internals should be exposed, even though the argv was already parsed by
node. This is unusual and unnecessary, change it to set the option value
from the parser onto the process object, as is done for the other CLI
options.
Checklist
Affected core subsystem(s)
src