mirror of
https://github.com/zebrajr/node.git
synced 2026-01-15 12:15:26 +00:00
report: add missing locks for report_on_fatalerror accessors
Overlooked in 2fa74e3e38.
Refs: https://github.com/nodejs/node/pull/32207
PR-URL: https://github.com/nodejs/node/pull/32535
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
This commit is contained in:
@@ -16,6 +16,7 @@
|
||||
|
||||
namespace report {
|
||||
using node::Environment;
|
||||
using node::Mutex;
|
||||
using node::Utf8Value;
|
||||
using v8::Boolean;
|
||||
using v8::Context;
|
||||
@@ -134,12 +135,14 @@ static void SetSignal(const FunctionCallbackInfo<Value>& info) {
|
||||
}
|
||||
|
||||
static void ShouldReportOnFatalError(const FunctionCallbackInfo<Value>& info) {
|
||||
Mutex::ScopedLock lock(node::per_process::cli_options_mutex);
|
||||
info.GetReturnValue().Set(
|
||||
node::per_process::cli_options->report_on_fatalerror);
|
||||
}
|
||||
|
||||
static void SetReportOnFatalError(const FunctionCallbackInfo<Value>& info) {
|
||||
CHECK(info[0]->IsBoolean());
|
||||
Mutex::ScopedLock lock(node::per_process::cli_options_mutex);
|
||||
node::per_process::cli_options->report_on_fatalerror = info[0]->IsTrue();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user