Moved integrity checker after checking command line args

Co-authored-by: Weiyun Dai <weiyun.chn@gmail.com>
This commit is contained in:
Andrew Lay
2023-11-10 08:28:29 -08:00
committed by GitHub
parent 331cf3cf75
commit a3c47eceb8

View File

@@ -216,10 +216,6 @@ int APIENTRY wWinMain(HINSTANCE instance, HINSTANCE, wchar_t* cmd, int) {
return crashpad_status;
}
if (process_type.empty()) {
IntegrityCheck();
}
#if BUILDFLAG(IS_WIN)
// access ui native theme here to prevent blocking calls later
base::win::AllowDarkModeForApp(true);
@@ -233,6 +229,10 @@ int APIENTRY wWinMain(HINSTANCE instance, HINSTANCE, wchar_t* cmd, int) {
if (!electron::CheckCommandLineArguments(arguments.argc, arguments.argv))
return -1;
if (process_type.empty()) {
IntegrityCheck();
}
sandbox::SandboxInterfaceInfo sandbox_info = {nullptr};
content::InitializeSandboxInfo(&sandbox_info);
electron::ElectronMainDelegate delegate;