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

Unified Diff: content/common/sandbox_mac_system_access_unittest.mm

Issue 203213005: Add HANDLE_EINTR in some places missing it. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix mac typo Created 6 years, 9 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 | « chrome/test/chromedriver/chrome_launcher.cc ('k') | sandbox/linux/services/yama.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/common/sandbox_mac_system_access_unittest.mm
diff --git a/content/common/sandbox_mac_system_access_unittest.mm b/content/common/sandbox_mac_system_access_unittest.mm
index 4ddc73a5988c0de0e012ae93a131ab1112890154..c527ea5be29b1f58c309482df3e19524df0d0e60 100644
--- a/content/common/sandbox_mac_system_access_unittest.mm
+++ b/content/common/sandbox_mac_system_access_unittest.mm
@@ -87,7 +87,7 @@ class MacSandboxedFileAccessTestCase : public MacSandboxTestCase {
REGISTER_SANDBOX_TEST_CASE(MacSandboxedFileAccessTestCase);
bool MacSandboxedFileAccessTestCase::SandboxedTest() {
- base::ScopedFD fdes(open("/etc/passwd", O_RDONLY));
+ base::ScopedFD fdes(HANDLE_EINTR(open("/etc/passwd", O_RDONLY)));
return !fdes.is_valid();
}
@@ -105,14 +105,14 @@ class MacSandboxedUrandomTestCase : public MacSandboxTestCase {
REGISTER_SANDBOX_TEST_CASE(MacSandboxedUrandomTestCase);
bool MacSandboxedUrandomTestCase::SandboxedTest() {
- base::ScopedFD fdes(open("/dev/urandom", O_RDONLY));
+ base::ScopedFD fdes(HANDLE_EINTR(open("/dev/urandom", O_RDONLY)));
// Opening /dev/urandom succeeds under the sandbox.
if (!fdes.is_valid())
return false;
char buf[16];
- int rc = read(fdes.get(), buf, sizeof(buf));
+ int rc = HANDLE_EINTR(read(fdes.get(), buf, sizeof(buf)));
return rc == sizeof(buf);
}
« no previous file with comments | « chrome/test/chromedriver/chrome_launcher.cc ('k') | sandbox/linux/services/yama.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698