summaryrefslogtreecommitdiffstats
path: root/chromium/base/mac/mac_util.h
diff options
context:
space:
mode:
authorAllan Sandfeld Jensen <[email protected]>2017-10-17 13:32:47 +0200
committerAllan Sandfeld Jensen <[email protected]>2017-10-20 11:06:34 +0000
commitdb205d71b2ac4cf5cedc762b1431decaca3c0321 (patch)
tree1a3abbabb57ad6be216ce48bcda87ffed9314ed6 /chromium/base/mac/mac_util.h
parent3d02dd98fb1928c0c92d3ca4d67c2baeca4aece1 (diff)
[Backport] mac: Update knowledge of CFAllocator internals for 10.1360-based
For each new major OS version, we need to poke at the internals of CFAllocator to enable the out-of-memory killer for the default CFAllocator implementations. This update is for macOS 10.13 ("High Sierra"), whose CFAllocator internals are unchanged from 10.12 (and in fact from 10.7). It also updates the base::mac::IsOS*() family of functions for this new OS version. BUG=45650 TEST=base_unittests OutOfMemoryDeathTest.CFAllocator*,MacUtilTest.IsOSEllipsis Change-Id: I2cab74c57cb75e4aebc2cb13d6844f0c77dbd54f Reviewed-on: https://chromium-review.googlesource.com/565467 Reviewed-by: Alexandru Croitor <[email protected]>
Diffstat (limited to 'chromium/base/mac/mac_util.h')
-rw-r--r--chromium/base/mac/mac_util.h10
1 files changed, 8 insertions, 2 deletions
diff --git a/chromium/base/mac/mac_util.h b/chromium/base/mac/mac_util.h
index 67d1880849e..37e5b670cee 100644
--- a/chromium/base/mac/mac_util.h
+++ b/chromium/base/mac/mac_util.h
@@ -147,6 +147,12 @@ DEFINE_IS_OS_FUNCS(12, TEST_DEPLOYMENT_TARGET)
DEFINE_IS_OS_FUNCS(12, IGNORE_DEPLOYMENT_TARGET)
#endif
+#ifdef MAC_OS_X_VERSION_10_13
+DEFINE_IS_OS_FUNCS(13, TEST_DEPLOYMENT_TARGET)
+#else
+DEFINE_IS_OS_FUNCS(13, IGNORE_DEPLOYMENT_TARGET)
+#endif
+
#undef IGNORE_DEPLOYMENT_TARGET
#undef TEST_DEPLOYMENT_TARGET
#undef DEFINE_IS_OS_FUNCS
@@ -154,8 +160,8 @@ DEFINE_IS_OS_FUNCS(12, IGNORE_DEPLOYMENT_TARGET)
// This should be infrequently used. It only makes sense to use this to avoid
// codepaths that are very likely to break on future (unreleased, untested,
// unborn) OS releases, or to log when the OS is newer than any known version.
-inline bool IsOSLaterThan10_12_DontCallThis() {
- return !IsAtMostOS10_12();
+inline bool IsOSLaterThan10_13_DontCallThis() {
+ return !IsAtMostOS10_13();
}
// Retrieve the system's model identifier string from the IOKit registry: