| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -728,12 +728,6 @@ void RunBootstrapping(Environment* env) { | |||
| 728 | 728 | return; | |
| 729 | 729 | } | |
| 730 | 730 | ||
| 731 | - #ifdef NODE_REPORT | ||
| 732 | - if (env->options()->experimental_report) { | ||
| 733 | - report::InitializeReport(env->isolate(), env); | ||
| 734 | - } | ||
| 735 | - #endif // NODE_REPORT | ||
| 736 | - | ||
| 737 | 731 | // process, loaderExports, isMainThread | |
| 738 | 732 | std::vector<Local<String>> node_params = { | |
| 739 | 733 | env->process_string(), | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -38,8 +38,6 @@ typedef struct tm TIME_TYPE; | |||
| 38 | 38 | #define PATHSEP "/" | |
| 39 | 39 | #endif | |
| 40 | 40 | ||
| 41 | - void InitializeReport(v8::Isolate* isolate, node::Environment* env); | ||
| 42 | - | ||
| 43 | 41 | // Function declarations - functions in src/node_report.cc | |
| 44 | 42 | std::string TriggerNodeReport(v8::Isolate* isolate, | |
| 45 | 43 | node::Environment* env, | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -108,15 +108,6 @@ void OnUserSignal(const FunctionCallbackInfo<Value>& info) { | |||
| 108 | 108 | isolate, env, *value, __func__, filename, info[0].As<String>()); | |
| 109 | 109 | } | |
| 110 | 110 | ||
| 111 | - // Native module initializer function, called when the module is require'd | ||
| 112 | - void InitializeReport(Isolate* isolate, Environment* env) { | ||
| 113 | - // Register the boot time of the process, for | ||
| 114 | - // computing resource consumption average etc. | ||
| 115 | - std::shared_ptr<PerIsolateOptions> options = env->isolate_data()->options(); | ||
| 116 | - | ||
| 117 | - if (options->report_signal == "") options->report_signal = "SIGUSR2"; | ||
| 118 | - } | ||
| 119 | - | ||
| 120 | 111 | // A method to sync up data elements in the JS land with its | |
| 121 | 112 | // corresponding elements in the C++ world. Required because | |
| 122 | 113 | // (i) the tunables are first intercepted through the CLI but | |
@@ -236,8 +227,9 @@ void SyncConfig(const FunctionCallbackInfo<Value>& info) { | |||
| 236 | 227 | Local<Value> signal_value; | |
| 237 | 228 | Local<Value> file_value; | |
| 238 | 229 | Local<Value> path_value; | |
| 239 | - if (!node::ToV8Value(context, options->report_signal) | ||
| 240 | - .ToLocal(&signal_value)) | ||
| 230 | + std::string signal = options->report_signal; | ||
| 231 | + if (signal.empty()) signal = "SIGUSR2"; | ||
| 232 | + if (!node::ToV8Value(context, signal).ToLocal(&signal_value)) | ||
| 241 | 233 | return; | |
| 242 | 234 | if (!obj->Set(context, signalkey, signal_value).FromJust()) return; | |
| 243 | 235 | ||
@@ -264,8 +256,6 @@ static void Initialize(Local<Object> exports, | |||
| 264 | 256 | Local<Context> context) { | |
| 265 | 257 | Environment* env = Environment::GetCurrent(context); | |
| 266 | 258 | std::shared_ptr<PerIsolateOptions> options = env->isolate_data()->options(); | |
| 267 | - Isolate* isolate = env->isolate(); | ||
| 268 | - InitializeReport(isolate, env); | ||
| 269 | 259 | env->SetMethod(exports, "triggerReport", TriggerReport); | |
| 270 | 260 | env->SetMethod(exports, "getReport", GetReport); | |
| 271 | 261 | env->SetMethod(exports, "onUnCaughtException", OnUncaughtException); | |
| Back | FazBrowse Home | New Git URL |
0 commit comments