| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent 970483f commit e3683cb
2 files changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -13,6 +13,7 @@ const { | |||
| 13 | 13 | const { | |
| 14 | 14 | getOptionValue, | |
| 15 | 15 | getEmbedderOptions, | |
| 16 | + refreshOptions, | ||
| 16 | 17 | } = require('internal/options'); | |
| 17 | 18 | const { reconnectZeroFillToggle } = require('internal/buffer'); | |
| 18 | 19 | const { | |
@@ -24,6 +25,8 @@ const { ERR_MANIFEST_ASSERT_INTEGRITY } = require('internal/errors').codes; | |||
| 24 | 25 | const assert = require('internal/assert'); | |
| 25 | 26 | ||
| 26 | 27 | function prepareMainThreadExecution(expandArgv1 = false) { | |
| 28 | + refreshRuntimeOptions(); | ||
| 29 | + | ||
| 27 | 30 | // TODO(joyeecheung): this is also necessary for workers when they deserialize | |
| 28 | 31 | // this toggle from the snapshot. | |
| 29 | 32 | reconnectZeroFillToggle(); | |
@@ -84,6 +87,10 @@ function prepareMainThreadExecution(expandArgv1 = false) { | |||
| 84 | 87 | initializeFrozenIntrinsics(); | |
| 85 | 88 | } | |
| 86 | 89 | ||
| 90 | + function refreshRuntimeOptions() { | ||
| 91 | + refreshOptions(); | ||
| 92 | + } | ||
| 93 | + | ||
| 87 | 94 | function patchProcessObject(expandArgv1) { | |
| 88 | 95 | const binding = internalBinding('process_methods'); | |
| 89 | 96 | binding.patchProcessObject(process); | |
@@ -565,6 +572,7 @@ function loadPreloadModules() { | |||
| 565 | 572 | } | |
| 566 | 573 | ||
| 567 | 574 | module.exports = { | |
| 575 | + refreshRuntimeOptions, | ||
| 568 | 576 | patchProcessObject, | |
| 569 | 577 | setupCoverageHooks, | |
| 570 | 578 | setupWarningHandler, | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -36,6 +36,11 @@ function getEmbedderOptions() { | |||
| 36 | 36 | return embedderOptions; | |
| 37 | 37 | } | |
| 38 | 38 | ||
| 39 | + function refreshOptions() { | ||
| 40 | + optionsMap = undefined; | ||
| 41 | + aliasesMap = undefined; | ||
| 42 | + } | ||
| 43 | + | ||
| 39 | 44 | function getOptionValue(optionName) { | |
| 40 | 45 | const options = getCLIOptionsFromBinding(); | |
| 41 | 46 | if (optionName.startsWith('--no-')) { | |
@@ -68,5 +73,6 @@ module.exports = { | |||
| 68 | 73 | }, | |
| 69 | 74 | getOptionValue, | |
| 70 | 75 | getAllowUnauthorized, | |
| 71 | - getEmbedderOptions | ||
| 76 | + getEmbedderOptions, | ||
| 77 | + refreshOptions | ||
| 72 | 78 | }; | |
| Back | FazBrowse Home | New Git URL |
0 commit comments