Commit f2e5a063 authored by Hidehiko Abe's avatar Hidehiko Abe Committed by Commit Bot

Expand OS_LINUX to OS_LINUX || OS_CHROMEOS.

Currently OS_LINUX is defined on Chrome OS build,
but it is being unset. This is the preparation to keep the
current behavior.

Bug: 1110266
Test: Built locally.
Change-Id: I773b4d46bc2e1f1cba9e3b8d0de5503d4e40eb92
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2449610
Commit-Queue: Hidehiko Abe <hidehiko@chromium.org>
Commit-Queue: Nico Weber <thakis@chromium.org>
Auto-Submit: Hidehiko Abe <hidehiko@chromium.org>
Reviewed-by: default avatarNico Weber <thakis@chromium.org>
Cr-Commit-Position: refs/heads/master@{#813779}
parent 117d6fb1
......@@ -14,7 +14,7 @@
#include "base/threading/platform_thread.h"
#include "build/build_config.h"
#if defined(OS_LINUX) || defined(OS_ANDROID)
#if defined(OS_LINUX) || defined(OS_CHROMEOS) || defined(OS_ANDROID)
#include "base/allocator/partition_allocator/spinning_futex_linux.h"
#endif
......@@ -142,7 +142,7 @@ class LOCKABLE MaybeSpinLock<true> {
}
private:
#if defined(OS_LINUX) || defined(OS_ANDROID)
#if defined(OS_LINUX) || defined(OS_CHROMEOS) || defined(OS_ANDROID)
base::NoDestructor<SpinningFutex> lock_;
#else
// base::Lock is slower on the fast path than SpinLock, hence we still use it
......
......@@ -7,7 +7,7 @@
#include "base/allocator/partition_allocator/partition_alloc_check.h"
#include "build/build_config.h"
#if defined(OS_LINUX) || defined(OS_ANDROID)
#if defined(OS_LINUX) || defined(OS_CHROMEOS) || defined(OS_ANDROID)
#include <errno.h>
#include <linux/futex.h>
......@@ -70,4 +70,4 @@ void SpinningFutex::LockSlow() {
} // namespace internal
} // namespace base
#endif // defined(OS_LINUX) || defined(OS_ANDROID)
#endif // defined(OS_LINUX) || defined(OS_CHROMEOS) || defined(OS_ANDROID)
......@@ -12,7 +12,7 @@
#include "base/compiler_specific.h"
#include "build/build_config.h"
#if !(defined(OS_LINUX) || defined(OS_ANDROID))
#if !(defined(OS_LINUX) || defined(OS_CHROMEOS) || defined(OS_ANDROID))
#error "Not supported"
#endif
......
......@@ -27,7 +27,8 @@
// on Windows 7 (at least). As long as it doesn't use something else on Windows,
// disable the cache (and tests)
#if !BUILDFLAG(USE_PARTITION_ALLOC_AS_MALLOC) && \
!defined(MEMORY_TOOL_REPLACES_ALLOCATOR) && defined(OS_LINUX)
!defined(MEMORY_TOOL_REPLACES_ALLOCATOR) && \
(defined(OS_LINUX) || defined(OS_CHROMEOS))
namespace base {
namespace internal {
......@@ -402,4 +403,5 @@ TEST_F(ThreadCacheTest, PurgeAll) NO_THREAD_SAFETY_ANALYSIS {
} // namespace base
#endif // !BUILDFLAG(USE_PARTITION_ALLOC_AS_MALLOC) &&
// !defined(MEMORY_TOOL_REPLACES_ALLOCATOR) && defined(OS_LINUX)
// !defined(MEMORY_TOOL_REPLACES_ALLOCATOR) &&
// (defined(OS_LINUX) || defined(OS_CHROMEOS))
......@@ -152,7 +152,7 @@ BASE_EXPORT size_t CollectStackTrace(void** trace, size_t count);
// scanning area at the origin of the stack, wasting time and not finding any
// frames (since Android libraries don't have frame pointers). Scanning is not
// enabled on other posix platforms due to legacy reasons.
#if defined(OS_LINUX)
#if defined(OS_LINUX) || defined(OS_CHROMEOS)
constexpr bool kEnableScanningByDefault = true;
#else
constexpr bool kEnableScanningByDefault = false;
......
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