Commit 6957c9a7 authored by Wez's avatar Wez Committed by Commit Bot

[Fuchsia] Remove some unnecessary defined(OS_FUCHSIA) conditionals.

Bug: 854721
Change-Id: I0bbad92f6698db479518f268d0ae797a0a3d2d81
Reviewed-on: https://chromium-review.googlesource.com/c/1424598Reviewed-by: default avatarFabrice de Gans-Riberi <fdegans@chromium.org>
Reviewed-by: default avatarKen Rockot <rockot@google.com>
Reviewed-by: default avatarAlbert J. Wong <ajwong@chromium.org>
Commit-Queue: Wez <wez@chromium.org>
Cr-Commit-Position: refs/heads/master@{#625332}
parent 63e92830
......@@ -22,9 +22,7 @@
#if defined(OS_POSIX)
#include <sys/mman.h>
#if !defined(OS_FUCHSIA)
#include <sys/resource.h>
#endif
#include <sys/time.h>
#endif // defined(OS_POSIX)
......@@ -74,7 +72,7 @@ bool SetAddressSpaceLimit() {
}
bool ClearAddressSpaceLimit() {
#if !defined(ARCH_CPU_64_BITS) || !defined(OS_POSIX) || defined(OS_FUCHSIA)
#if !defined(ARCH_CPU_64_BITS) || !defined(OS_POSIX)
return true;
#elif defined(OS_POSIX)
struct rlimit limit;
......@@ -1352,8 +1350,7 @@ TEST_F(PartitionAllocTest, LostFreePagesBug) {
// cause flake.
#if !defined(OS_WIN) && \
(!defined(ARCH_CPU_64_BITS) || \
(defined(OS_POSIX) && \
!(defined(OS_FUCHSIA) || defined(OS_MACOSX) || defined(OS_ANDROID))))
(defined(OS_POSIX) && !(defined(OS_MACOSX) || defined(OS_ANDROID))))
// The following four tests wrap a called function in an expect death statement
// to perform their test, because they are non-hermetic. Specifically they are
......@@ -1401,7 +1398,7 @@ TEST_F(PartitionAllocDeathTest, RepeatedTryReallocReturnNull) {
}
#endif // !defined(ARCH_CPU_64_BITS) || (defined(OS_POSIX) &&
// !(defined(OS_FUCHSIA) || defined(OS_MACOSX) || defined(OS_ANDROID)))
// !(defined(OS_MACOSX) || defined(OS_ANDROID)))
// Make sure that malloc(-1) dies.
// In the past, we had an integer overflow that would alias malloc(-1) to
......
......@@ -115,10 +115,10 @@ void BrokerHost::OnBufferRequest(uint32_t num_bytes) {
region.PassPlatformHandle(), &h[0], &h[1]);
handles[0] = PlatformHandleInTransit(std::move(h[0]));
handles[1] = PlatformHandleInTransit(std::move(h[1]));
#if !defined(OS_POSIX) || defined(OS_ANDROID) || defined(OS_FUCHSIA) || \
#if !defined(OS_POSIX) || defined(OS_ANDROID) || \
(defined(OS_MACOSX) && !defined(OS_IOS))
// Non-POSIX systems, as well as Android, Fuchsia, and non-iOS Mac, only use
// a single handle to represent a writable region.
// Non-POSIX systems, as well as Android, and non-iOS Mac, only use a single
// handle to represent a writable region.
DCHECK(!handles[1].handle().is_valid());
handles.resize(1);
#else
......
......@@ -111,10 +111,10 @@ base::WritableSharedMemoryRegion Broker::GetWritableSharedMemoryRegion(
return base::WritableSharedMemoryRegion();
}
#if !defined(OS_POSIX) || defined(OS_ANDROID) || defined(OS_FUCHSIA) || \
#if !defined(OS_POSIX) || defined(OS_ANDROID) || \
(defined(OS_MACOSX) && !defined(OS_IOS))
// Non-POSIX systems, as well as Android, Fuchsia, and non-iOS Mac, only use
// a single handle to represent a writable region.
// Non-POSIX systems, as well as Android, and non-iOS Mac, only use a single
// handle to represent a writable region.
constexpr size_t kNumExpectedHandles = 1;
#else
constexpr size_t kNumExpectedHandles = 2;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment