summaryrefslogtreecommitdiff
path: root/lib/internal/bootstrap/pre_execution.js
diff options
context:
space:
mode:
authorcjihrig <cjihrig@gmail.com>2019-03-03 12:05:38 -0500
committercjihrig <cjihrig@gmail.com>2019-03-05 15:35:58 -0500
commit30ee27784c935dd174238edecbd93edb4aab8972 (patch)
tree3f098f45a3d7e226268f45b64954657221bcb8ff /lib/internal/bootstrap/pre_execution.js
parentc78788a0219cc950be7159e65b9e8db01e9c1a7a (diff)
downloadandroid-node-v8-30ee27784c935dd174238edecbd93edb4aab8972.tar.gz
android-node-v8-30ee27784c935dd174238edecbd93edb4aab8972.tar.bz2
android-node-v8-30ee27784c935dd174238edecbd93edb4aab8972.zip
report: refactor configuration management
This commit removes process.report.setOptions(). Instead of using complex configuration synchronization between C++ and JS, this commit introduces individual getters and setters. PR-URL: https://github.com/nodejs/node/pull/26414 Reviewed-By: Richard Lau <riclau@uk.ibm.com> Reviewed-By: Wyatt Preul <wpreul@gmail.com>
Diffstat (limited to 'lib/internal/bootstrap/pre_execution.js')
-rw-r--r--lib/internal/bootstrap/pre_execution.js19
1 files changed, 5 insertions, 14 deletions
diff --git a/lib/internal/bootstrap/pre_execution.js b/lib/internal/bootstrap/pre_execution.js
index 3578e7c112..b6e606cf9d 100644
--- a/lib/internal/bootstrap/pre_execution.js
+++ b/lib/internal/bootstrap/pre_execution.js
@@ -40,14 +40,8 @@ function initializeReport() {
if (!getOptionValue('--experimental-report')) {
return;
}
- const {
- config,
- report,
- syncConfig
- } = require('internal/process/report');
+ const { report } = require('internal/process/report');
process.report = report;
- // Download the CLI / ENV config into JS land.
- syncConfig(config, false);
}
function setupSignalHandlers() {
@@ -68,13 +62,10 @@ function initializeReportSignalHandlers() {
if (!getOptionValue('--experimental-report')) {
return;
}
- const {
- config,
- handleSignal
- } = require('internal/process/report');
- if (config.events.includes('signal')) {
- process.on(config.signal, handleSignal);
- }
+
+ const { addSignalHandler } = require('internal/process/report');
+
+ addSignalHandler();
}
function setupTraceCategoryState() {