Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(613)

Unified Diff: sandbox/win/src/broker_services.cc

Issue 1923653002: Wire up process launch error codes. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix debug and clang Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « content/public/common/sandbox_init.h ('k') | sandbox/win/src/sandbox_policy_base.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sandbox/win/src/broker_services.cc
diff --git a/sandbox/win/src/broker_services.cc b/sandbox/win/src/broker_services.cc
index fe04b1c97429268f5a7aab4a64b64fc171a31595..1339abffb6ed6b8f00f0b63f42e4b03d91dda923 100644
--- a/sandbox/win/src/broker_services.cc
+++ b/sandbox/win/src/broker_services.cc
@@ -409,17 +409,21 @@ ResultCode BrokerServicesBase::SpawnTarget(const wchar_t* exe_path,
new TargetProcess(std::move(initial_token), std::move(lockdown_token),
std::move(lowbox_token), job.Get(), thread_pool_);
- DWORD win_result = target->Create(exe_path, command_line, inherit_handles,
- startup_info, &process_info);
+ DWORD win_result;
+ result = target->Create(exe_path, command_line, inherit_handles, startup_info,
+ &process_info, &win_result);
- if (ERROR_SUCCESS != win_result) {
+ if (result != SBOX_ALL_OK) {
SpawnCleanup(target, win_result);
- return SBOX_ERROR_CREATE_PROCESS;
+ return result;
}
// Now the policy is the owner of the target.
- if (!policy_base->AddTarget(target)) {
- return SpawnCleanup(target, 0);
+ result = policy_base->AddTarget(target);
+
+ if (result != SBOX_ALL_OK) {
+ SpawnCleanup(target, 0);
+ return result;
}
// We are going to keep a pointer to the policy because we'll call it when
@@ -447,7 +451,7 @@ ResultCode BrokerServicesBase::SpawnTarget(const wchar_t* exe_path,
}
*target_info = process_info.Take();
- return SBOX_ALL_OK;
+ return result;
}
« no previous file with comments | « content/public/common/sandbox_init.h ('k') | sandbox/win/src/sandbox_policy_base.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698