Bug 1325227 - Part 3: Allow child process to share semaphore handles with the parent/gpu processes. r=bobowen

This commit is contained in:
Matt Woodrow 2017-02-04 23:19:03 +13:00
parent 08e918a18b
commit 0686551eab

View File

@ -222,6 +222,19 @@ SandboxBroker::SetSecurityLevelForContentProcess(int32_t aSandboxLevel,
L"Section");
MOZ_RELEASE_ASSERT(sandbox::SBOX_ALL_OK == result,
"With these static arguments AddRule should never fail, what happened?");
// The content process needs to be able to duplicate semaphore handles,
// to the broker process and other child processes.
result = mPolicy->AddRule(sandbox::TargetPolicy::SUBSYS_HANDLES,
sandbox::TargetPolicy::HANDLES_DUP_BROKER,
L"Semaphore");
MOZ_RELEASE_ASSERT(sandbox::SBOX_ALL_OK == result,
"With these static arguments AddRule should never fail, what happened?");
result = mPolicy->AddRule(sandbox::TargetPolicy::SUBSYS_HANDLES,
sandbox::TargetPolicy::HANDLES_DUP_ANY,
L"Semaphore");
MOZ_RELEASE_ASSERT(sandbox::SBOX_ALL_OK == result,
"With these static arguments AddRule should never fail, what happened?");
}
#endif