fix: building with enable_run_as_node disabled (#18887)
This commit is contained in:
parent
5247fe6038
commit
aa522731a2
1 changed files with 7 additions and 2 deletions
|
@ -25,8 +25,13 @@ const char kCrashpadProcess[] = "crash-handler";
|
||||||
const char kCrashesDirectoryKey[] = "crashes-directory";
|
const char kCrashesDirectoryKey[] = "crashes-directory";
|
||||||
|
|
||||||
CrashReporter::CrashReporter() {
|
CrashReporter::CrashReporter() {
|
||||||
std::unique_ptr<base::Environment> env = base::Environment::Create();
|
#if BUILDFLAG(ENABLE_RUN_AS_NODE)
|
||||||
if (env->HasVar(atom::kRunAsNode)) {
|
bool run_as_node = base::Environment::Create()->HasVar(atom::kRunAsNode);
|
||||||
|
#else
|
||||||
|
bool run_as_node = false;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
if (run_as_node) {
|
||||||
process_type_ = "node";
|
process_type_ = "node";
|
||||||
} else {
|
} else {
|
||||||
auto* cmd = base::CommandLine::ForCurrentProcess();
|
auto* cmd = base::CommandLine::ForCurrentProcess();
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue