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

Unified Diff: components/nacl/zygote/nacl_fork_delegate_linux.cc

Issue 22911027: Pass StatsTable shared memory via global descriptors on Posix rather than using named shared memory. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 7 years, 3 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
Index: components/nacl/zygote/nacl_fork_delegate_linux.cc
diff --git a/components/nacl/zygote/nacl_fork_delegate_linux.cc b/components/nacl/zygote/nacl_fork_delegate_linux.cc
index d94ad6b9fdfe5237b92fd6592eed54338da34a78..16fd30ce8941259747ce7a610daf73baa7012671 100644
--- a/components/nacl/zygote/nacl_fork_delegate_linux.cc
+++ b/components/nacl/zygote/nacl_fork_delegate_linux.cc
@@ -110,10 +110,6 @@ void NaClForkDelegate::Init(const int sandboxdesc) {
VLOG(1) << "NaClForkDelegate::Init()";
int fds[2];
- // Confirm a hard-wired assumption.
- // The NaCl constant is from chrome/nacl/nacl_linux_helper.h
- DCHECK(kNaClSandboxDescriptor == sandboxdesc);
-
CHECK(socketpair(PF_UNIX, SOCK_SEQPACKET, 0, fds) == 0);
base::FileHandleMappingVector fds_to_map;
fds_to_map.push_back(std::make_pair(fds[1], kNaClZygoteDescriptor));
@@ -257,8 +253,7 @@ bool NaClForkDelegate::CanHelp(const std::string& process_type,
pid_t NaClForkDelegate::Fork(const std::vector<int>& fds) {
VLOG(1) << "NaClForkDelegate::Fork";
-
- DCHECK(fds.size() == kNaClParentFDIndex + 1);
+ DCHECK(fds.size() == kNaClParentFDIndex(fds.size()) + 1);
// First, send a remote fork request.
Pickle write_pickle;

Powered by Google App Engine
This is Rietveld 408576698