summaryrefslogtreecommitdiffstats
path: root/base
diff options
context:
space:
mode:
authorrtenneti@chromium.org <rtenneti@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-12-03 20:27:57 +0000
committerrtenneti@chromium.org <rtenneti@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-12-03 20:27:57 +0000
commit7837a3ecf0542d55a433c9d9ab97d3d5f9252df5 (patch)
tree0115e842fb2cc2f97f0fffdfe936a00bfeede8a9 /base
parent1852a6356c926f7f0d5d9afe95800f78b3b926f8 (diff)
downloadchromium_src-7837a3ecf0542d55a433c9d9ab97d3d5f9252df5.zip
chromium_src-7837a3ecf0542d55a433c9d9ab97d3d5f9252df5.tar.gz
chromium_src-7837a3ecf0542d55a433c9d9ab97d3d5f9252df5.tar.bz2
Speculatively reverting 166585 to see if it fixes issue 160300 - 6% startup regression on Mac 10.6
Revert 166585 - Add a histogram enum to determine the cat's flavor and how many bits there are in it. BUG=159886, 160300 Review URL: https://codereview.chromium.org/11391002 TBR=mark@chromium.org Review URL: https://codereview.chromium.org/11348360 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@170800 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'base')
-rw-r--r--base/mac/mac_util.h8
-rw-r--r--base/mac/mac_util.mm2
-rw-r--r--base/mac/mac_util_unittest.mm9
-rw-r--r--base/process_util_mac.mm3
4 files changed, 14 insertions, 8 deletions
diff --git a/base/mac/mac_util.h b/base/mac/mac_util.h
index ff8b2b2..1b75167 100644
--- a/base/mac/mac_util.h
+++ b/base/mac/mac_util.h
@@ -140,8 +140,9 @@ BASE_EXPORT bool IsOSMountainLionOrLater();
// 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.
-BASE_EXPORT bool IsOSLaterThanMountainLion_DontCallThis();
+// unborn) OS releases.
+BASE_EXPORT
+ bool IsOSDangerouslyLaterThanMountainLionForUseByCFAllocatorReplacement();
// When the deployment target is set, the code produced cannot run on earlier
// OS releases. That enables some of the IsOS* family to be implemented as
@@ -172,7 +173,8 @@ inline bool IsOSMountainLionOrLater() { return true; }
MAC_OS_X_VERSION_MIN_REQUIRED > MAC_OS_X_VERSION_10_8
#define BASE_MAC_MAC_UTIL_H_INLINED_GT_10_8
inline bool IsOSMountainLion() { return false; }
-inline bool IsOSLaterThanMountainLion_DontCallThis() {
+inline bool IsOSDangerouslyLaterThanMountainLionForUseByCFAllocatorReplacement()
+{
return true;
}
#endif
diff --git a/base/mac/mac_util.mm b/base/mac/mac_util.mm
index 4fb1a42..a0aa72c 100644
--- a/base/mac/mac_util.mm
+++ b/base/mac/mac_util.mm
@@ -604,7 +604,7 @@ bool IsOSMountainLionOrLater() {
#endif
#if !defined(BASE_MAC_MAC_UTIL_H_INLINED_GT_10_8)
-bool IsOSLaterThanMountainLion_DontCallThis() {
+bool IsOSDangerouslyLaterThanMountainLionForUseByCFAllocatorReplacement() {
return MacOSXMinorVersion() > MOUNTAIN_LION_MINOR_VERSION;
}
#endif
diff --git a/base/mac/mac_util_unittest.mm b/base/mac/mac_util_unittest.mm
index d69e077..9fafa6c 100644
--- a/base/mac/mac_util_unittest.mm
+++ b/base/mac/mac_util_unittest.mm
@@ -158,7 +158,8 @@ TEST_F(MacUtilTest, IsOSEllipsis) {
EXPECT_FALSE(IsOSLionOrLater());
EXPECT_FALSE(IsOSMountainLion());
EXPECT_FALSE(IsOSMountainLionOrLater());
- EXPECT_FALSE(IsOSLaterThanMountainLion_DontCallThis());
+ EXPECT_FALSE(
+ IsOSDangerouslyLaterThanMountainLionForUseByCFAllocatorReplacement());
} else if (minor == 7) {
EXPECT_FALSE(IsOSSnowLeopard());
EXPECT_TRUE(IsOSLion());
@@ -166,7 +167,8 @@ TEST_F(MacUtilTest, IsOSEllipsis) {
EXPECT_TRUE(IsOSLionOrLater());
EXPECT_FALSE(IsOSMountainLion());
EXPECT_FALSE(IsOSMountainLionOrLater());
- EXPECT_FALSE(IsOSLaterThanMountainLion_DontCallThis());
+ EXPECT_FALSE(
+ IsOSDangerouslyLaterThanMountainLionForUseByCFAllocatorReplacement());
} else if (minor == 8) {
EXPECT_FALSE(IsOSSnowLeopard());
EXPECT_FALSE(IsOSLion());
@@ -174,7 +176,8 @@ TEST_F(MacUtilTest, IsOSEllipsis) {
EXPECT_TRUE(IsOSLionOrLater());
EXPECT_TRUE(IsOSMountainLion());
EXPECT_TRUE(IsOSMountainLionOrLater());
- EXPECT_FALSE(IsOSLaterThanMountainLion_DontCallThis());
+ EXPECT_FALSE(
+ IsOSDangerouslyLaterThanMountainLionForUseByCFAllocatorReplacement());
} else {
// Not five, six, seven, or eight. Ah, ah, ah.
EXPECT_TRUE(false);
diff --git a/base/process_util_mac.mm b/base/process_util_mac.mm
index 373d4cf..442ddcc 100644
--- a/base/process_util_mac.mm
+++ b/base/process_util_mac.mm
@@ -819,7 +819,8 @@ void oom_killer_new() {
// === Core Foundation CFAllocators ===
bool CanGetContextForCFAllocator() {
- return !base::mac::IsOSLaterThanMountainLion_DontCallThis();
+ return !base::mac::
+ IsOSDangerouslyLaterThanMountainLionForUseByCFAllocatorReplacement();
}
CFAllocatorContext* ContextForCFAllocator(CFAllocatorRef allocator) {