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

Unified Diff: sandbox/mac/bootstrap_sandbox.cc

Issue 303293002: Initialize the bootstrap sandbox in the browser process. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rename constant Created 6 years, 6 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/sandboxed_process_launcher_delegate.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sandbox/mac/bootstrap_sandbox.cc
diff --git a/sandbox/mac/bootstrap_sandbox.cc b/sandbox/mac/bootstrap_sandbox.cc
index b90d8d1d69306aa90a4a02134ede28ebb5942699..6407c68f59f541cd051c35085e12bd83ce393876 100644
--- a/sandbox/mac/bootstrap_sandbox.cc
+++ b/sandbox/mac/bootstrap_sandbox.cc
@@ -60,7 +60,7 @@ void BootstrapSandbox::RegisterSandboxPolicy(
int sandbox_policy_id,
const BootstrapSandboxPolicy& policy) {
CHECK(IsPolicyValid(policy));
- CHECK_GT(sandbox_policy_id, 0);
+ CHECK_GT(sandbox_policy_id, kNotAPolicy);
base::AutoLock lock(lock_);
DCHECK(policies_.find(sandbox_policy_id) == policies_.end());
policies_.insert(std::make_pair(sandbox_policy_id, policy));
@@ -102,8 +102,8 @@ void BootstrapSandbox::FinishedFork(base::ProcessHandle handle) {
void BootstrapSandbox::ChildDied(base::ProcessHandle handle) {
base::AutoLock lock(lock_);
const auto& it = sandboxed_processes_.find(handle);
- CHECK(it != sandboxed_processes_.end());
- sandboxed_processes_.erase(it);
+ if (it != sandboxed_processes_.end())
+ sandboxed_processes_.erase(it);
}
const BootstrapSandboxPolicy* BootstrapSandbox::PolicyForProcess(
« no previous file with comments | « content/public/common/sandboxed_process_launcher_delegate.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698