GeezerVison is showing github.com — src: unconditionally include report feature · jigfox/node@a6bd2c2
File treeExpand file treeCollapse file tree Open diff view settings Expand file treeCollapse file tree Open diff view settings Collapse file Copy file name to clipboardExpand all lines: src/node.cc +1-6Lines changed: 1 addition & 6 deletions | Original file line number | Diff line number | Diff line change |
|---|
| 35 | 35 | #include "node_options-inl.h" | 36 | 36 | #include "node_perf.h" | 37 | 37 | #include "node_process.h" | | 38 | +#include "node_report.h" | 38 | 39 | #include "node_revert.h" | 39 | 40 | #include "node_v8_platform-inl.h" | 40 | 41 | #include "node_version.h" | | 67 | 68 |
| 68 | 69 | #include "large_pages/node_large_page.h" | 69 | 70 |
| 70 | | -#ifdef NODE_REPORT | 71 | | -#include "node_report.h" | 72 | | -#endif | 73 | | - | 74 | 71 | #if defined(__APPLE__) || defined(__linux__) | 75 | 72 | #define NODE_USE_V8_WASM_TRAP_HANDLER 1 | 76 | 73 | #else | @@ -781,11 +778,9 @@ int InitializeNodeWithArgs(std::vector<std::string>* argv, | 781 | 778 | // Make inherited handles noninheritable. | 782 | 779 | uv_disable_stdio_inheritance(); | 783 | 780 |
| 784 | | -#ifdef NODE_REPORT | 785 | 781 | // Cache the original command line to be | 786 | 782 | // used in diagnostic reports. | 787 | 783 | per_process::cli_options->cmdline = *argv; | 788 | | -#endif // NODE_REPORT | 789 | 784 |
| 790 | 785 | #if defined(NODE_V8_OPTIONS) | 791 | 786 | // Should come before the call to V8::SetFlagsFromCommandLine() | |
Collapse file Copy file name to clipboardExpand all lines: src/node_binding.cc +1-7Lines changed: 1 addition & 7 deletions | Original file line number | Diff line number | Diff line change |
|---|
| 17 | 17 | #define NODE_BUILTIN_ICU_MODULES(V) | 18 | 18 | #endif | 19 | 19 |
| 20 | | -#if NODE_REPORT | 21 | | -#define NODE_BUILTIN_REPORT_MODULES(V) V(report) | 22 | | -#else | 23 | | -#define NODE_BUILTIN_REPORT_MODULES(V) | 24 | | -#endif | 25 | | - | 26 | 20 | #if HAVE_INSPECTOR | 27 | 21 | #define NODE_BUILTIN_PROFILER_MODULES(V) V(profiler) | 28 | 22 | #else | | 67 | 61 | V(pipe_wrap) \ | 68 | 62 | V(process_wrap) \ | 69 | 63 | V(process_methods) \ | | 64 | + V(report) \ | 70 | 65 | V(serdes) \ | 71 | 66 | V(signal_wrap) \ | 72 | 67 | V(spawn_sync) \ | | 94 | 89 | NODE_BUILTIN_STANDARD_MODULES(V) \ | 95 | 90 | NODE_BUILTIN_OPENSSL_MODULES(V) \ | 96 | 91 | NODE_BUILTIN_ICU_MODULES(V) \ | 97 | | - NODE_BUILTIN_REPORT_MODULES(V) \ | 98 | 92 | NODE_BUILTIN_PROFILER_MODULES(V) \ | 99 | 93 | NODE_BUILTIN_DTRACE_MODULES(V) | 100 | 94 |
| |
Collapse file Copy file name to clipboardExpand all lines: src/node_errors.cc +2-4Lines changed: 2 additions & 4 deletions | Original file line number | Diff line number | Diff line change |
|---|
| 4 | 4 | #include "debug_utils-inl.h" | 5 | 5 | #include "node_errors.h" | 6 | 6 | #include "node_internals.h" | 7 | | -#ifdef NODE_REPORT | 8 | 7 | #include "node_report.h" | 9 | | -#endif | 10 | 8 | #include "node_process.h" | 11 | 9 | #include "node_v8_platform-inl.h" | 12 | 10 | #include "util-inl.h" | @@ -405,14 +403,14 @@ void OnFatalError(const char* location, const char* message) { | 405 | 403 | } else { | 406 | 404 | FPrintF(stderr, "FATAL ERROR: %s\n", message); | 407 | 405 | } | 408 | | -#ifdef NODE_REPORT | | 406 | + | 409 | 407 | Isolate* isolate = Isolate::GetCurrent(); | 410 | 408 | Environment* env = Environment::GetCurrent(isolate); | 411 | 409 | if (env == nullptr || env->isolate_data()->options()->report_on_fatalerror) { | 412 | 410 | report::TriggerNodeReport( | 413 | 411 | isolate, env, message, "FatalError", "", Local<String>()); | 414 | 412 | } | 415 | | -#endif // NODE_REPORT | | 413 | + | 416 | 414 | fflush(stderr); | 417 | 415 | ABORT(); | 418 | 416 | } | |
Collapse file Copy file name to clipboardExpand all lines: src/node_options.cc +1-7Lines changed: 1 addition & 7 deletions | Original file line number | Diff line number | Diff line change |
|---|
@@ -76,7 +76,7 @@ void PerProcessOptions::CheckOptions(std::vector<std::string>* errors) { | 76 | 76 |
| 77 | 77 | void PerIsolateOptions::CheckOptions(std::vector<std::string>* errors) { | 78 | 78 | per_env->CheckOptions(errors); | 79 | | -#ifdef NODE_REPORT | | 79 | + | 80 | 80 | if (per_env->experimental_report) { | 81 | 81 | // Assign the report_signal default value here. Once the | 82 | 82 | // --experimental-report flag is dropped, move this initialization to | @@ -117,7 +117,6 @@ void PerIsolateOptions::CheckOptions(std::vector<std::string>* errors) { | 117 | 117 | "--report-uncaught-exception option is valid only when " | 118 | 118 | "--experimental-report is set"); | 119 | 119 | } | 120 | | -#endif // NODE_REPORT | 121 | 120 | } | 122 | 121 |
| 123 | 122 | void EnvironmentOptions::CheckOptions(std::vector<std::string>* errors) { | @@ -361,12 +360,10 @@ EnvironmentOptionsParser::EnvironmentOptionsParser() { | 361 | 360 | &EnvironmentOptions::experimental_vm_modules, | 362 | 361 | kAllowedInEnvironment); | 363 | 362 | AddOption("--experimental-worker", "", NoOp{}, kAllowedInEnvironment); | 364 | | -#ifdef NODE_REPORT | 365 | 363 | AddOption("--experimental-report", | 366 | 364 | "enable report generation", | 367 | 365 | &EnvironmentOptions::experimental_report, | 368 | 366 | kAllowedInEnvironment); | 369 | | -#endif // NODE_REPORT | 370 | 367 | AddOption("--experimental-wasi-unstable-preview1", | 371 | 368 | "experimental WASI support", | 372 | 369 | &EnvironmentOptions::experimental_wasi, | @@ -620,8 +617,6 @@ PerIsolateOptionsParser::PerIsolateOptionsParser( | 620 | 617 | "disable runtime allocation of executable memory", | 621 | 618 | V8Option{}, | 622 | 619 | kAllowedInEnvironment); | 623 | | - | 624 | | -#ifdef NODE_REPORT | 625 | 620 | AddOption("--report-uncaught-exception", | 626 | 621 | "generate diagnostic report on uncaught exceptions", | 627 | 622 | &PerIsolateOptions::report_uncaught_exception, | @@ -650,7 +645,6 @@ PerIsolateOptionsParser::PerIsolateOptionsParser( | 650 | 645 | " (default: current working directory of Node.js process)", | 651 | 646 | &PerIsolateOptions::report_directory, | 652 | 647 | kAllowedInEnvironment); | 653 | | -#endif // NODE_REPORT | 654 | 648 |
| 655 | 649 | Insert(eop, &PerIsolateOptions::get_per_env_options); | 656 | 650 | } | |
Collapse file Copy file name to clipboardExpand all lines: src/node_options.h -8Lines changed: 0 additions & 8 deletions | Original file line number | Diff line number | Diff line change |
|---|
@@ -151,9 +151,7 @@ class EnvironmentOptions : public Options { | 151 | 151 |
| 152 | 152 | bool syntax_check_only = false; | 153 | 153 | bool has_eval_string = false; | 154 | | -#ifdef NODE_REPORT | 155 | 154 | bool experimental_report = false; | 156 | | -#endif // NODE_REPORT | 157 | 155 | bool experimental_wasi = false; | 158 | 156 | std::string eval_string; | 159 | 157 | bool print_eval = false; | @@ -187,15 +185,12 @@ class PerIsolateOptions : public Options { | 187 | 185 | std::shared_ptr<EnvironmentOptions> per_env { new EnvironmentOptions() }; | 188 | 186 | bool track_heap_objects = false; | 189 | 187 | bool no_node_snapshot = false; | 190 | | - | 191 | | -#ifdef NODE_REPORT | 192 | 188 | bool report_uncaught_exception = false; | 193 | 189 | bool report_on_signal = false; | 194 | 190 | bool report_on_fatalerror = false; | 195 | 191 | std::string report_signal; | 196 | 192 | std::string report_filename; | 197 | 193 | std::string report_directory; | 198 | | -#endif // NODE_REPORT | 199 | 194 | inline EnvironmentOptions* get_per_env_options(); | 200 | 195 | void CheckOptions(std::vector<std::string>* errors) override; | 201 | 196 | }; | @@ -239,10 +234,7 @@ class PerProcessOptions : public Options { | 239 | 234 | #endif | 240 | 235 | std::string use_largepages = "off"; | 241 | 236 | bool trace_sigint = false; | 242 | | - | 243 | | -#ifdef NODE_REPORT | 244 | 237 | std::vector<std::string> cmdline; | 245 | | -#endif // NODE_REPORT | 246 | 238 |
| 247 | 239 | inline PerIsolateOptions* get_per_isolate_options(); | 248 | 240 | void CheckOptions(std::vector<std::string>* errors) override; | |
|