Bug 1422198 - Log about failure to send a sandbox broker reply. r=gcp

MozReview-Commit-ID: eDcoMHGFxo

--HG--
extra : rebase_source : 6033f39a290b7b3dcbcebfaa8712e838e63fc09e
This commit is contained in:
Jed Davis 2017-12-08 14:43:36 -07:00
parent a5b6ed41e4
commit 7dcac56405

View File

@ -884,7 +884,11 @@ SandboxBroker::ThreadMain(void)
} }
const size_t numIO = ios[1].iov_len > 0 ? 2 : 1; const size_t numIO = ios[1].iov_len > 0 ? 2 : 1;
DebugOnly<const ssize_t> sent = SendWithFd(respfd, ios, numIO, openedFd); const ssize_t sent = SendWithFd(respfd, ios, numIO, openedFd);
if (sent < 0) {
SANDBOX_LOG_ERROR("failed to send broker response to pid %d: %s", mChildPid,
strerror(errno));
}
close(respfd); close(respfd);
MOZ_ASSERT(sent < 0 || MOZ_ASSERT(sent < 0 ||
static_cast<size_t>(sent) == ios[0].iov_len + ios[1].iov_len); static_cast<size_t>(sent) == ios[0].iov_len + ios[1].iov_len);