Differential D38165 Diff 118368 www/qt5-webengine/files/patch-src_3rdparty_chromium_base_memory_discardable__memory.cc
Changeset View
Changeset View
Standalone View
Standalone View
www/qt5-webengine/files/patch-src_3rdparty_chromium_base_memory_discardable__memory.cc
--- src/3rdparty/chromium/base/memory/discardable_memory.cc.orig 2020-11-07 01:22:36 UTC | --- src/3rdparty/chromium/base/memory/discardable_memory.cc.orig 2021-12-15 16:12:54 UTC | ||||
+++ src/3rdparty/chromium/base/memory/discardable_memory.cc | +++ src/3rdparty/chromium/base/memory/discardable_memory.cc | ||||
@@ -23,7 +23,7 @@ const base::Feature kMadvFreeDiscardableMemory{ | @@ -23,7 +23,7 @@ const base::Feature kMadvFreeDiscardableMemory{ | ||||
"MadvFreeDiscardableMemory", base::FEATURE_DISABLED_BY_DEFAULT}; | "MadvFreeDiscardableMemory", base::FEATURE_DISABLED_BY_DEFAULT}; | ||||
#endif // defined(OS_POSIX) | #endif // defined(OS_POSIX) | ||||
-#if defined(OS_ANDROID) || defined(OS_LINUX) | -#if defined(OS_ANDROID) || defined(OS_LINUX) || defined(OS_CHROMEOS) | ||||
+#if defined(OS_ANDROID) || defined(OS_LINUX) || defined(OS_BSD) | +#if defined(OS_ANDROID) || defined(OS_LINUX) || defined(OS_CHROMEOS) || defined(OS_BSD) | ||||
const base::Feature kDiscardableMemoryBackingTrial{ | const base::Feature kDiscardableMemoryBackingTrial{ | ||||
"DiscardableMemoryBackingTrial", base::FEATURE_DISABLED_BY_DEFAULT}; | "DiscardableMemoryBackingTrial", base::FEATURE_DISABLED_BY_DEFAULT}; | ||||
@@ -41,13 +41,13 @@ const base::FeatureParam<DiscardableMemoryTrialGroup> | @@ -41,13 +41,13 @@ const base::FeatureParam<DiscardableMemoryTrialGroup> | ||||
DiscardableMemoryTrialGroup::kEmulatedSharedMemory, | DiscardableMemoryTrialGroup::kEmulatedSharedMemory, | ||||
&kDiscardableMemoryBackingParamOptions}; | &kDiscardableMemoryBackingParamOptions}; | ||||
-#endif // defined(OS_ANDROID) || defined(OS_LINUX) | -#endif // defined(OS_ANDROID) || defined(OS_LINUX) || defined(OS_CHROMEOS) | ||||
+#endif // defined(OS_ANDROID) || defined(OS_LINUX) || defined(OS_BSD) | +#endif // defined(OS_ANDROID) || defined(OS_LINUX) || defined(OS_CHROMEOS) || defined(OS_BSD) | ||||
} // namespace features | } // namespace features | ||||
namespace { | namespace { | ||||
-#if defined(OS_ANDROID) || defined(OS_LINUX) | -#if defined(OS_ANDROID) || defined(OS_LINUX) || defined(OS_CHROMEOS) | ||||
+#if defined(OS_ANDROID) || defined(OS_LINUX) || defined(OS_BSD) | +#if defined(OS_ANDROID) || defined(OS_LINUX) || defined(OS_CHROMEOS) || defined(OS_BSD) | ||||
DiscardableMemoryBacking GetBackingForFieldTrial() { | DiscardableMemoryBacking GetBackingForFieldTrial() { | ||||
DiscardableMemoryTrialGroup trial_group = | DiscardableMemoryTrialGroup trial_group = | ||||
@@ -61,11 +61,11 @@ DiscardableMemoryBacking GetBackingForFieldTrial() { | @@ -61,11 +61,11 @@ DiscardableMemoryBacking GetBackingForFieldTrial() { | ||||
} | } | ||||
NOTREACHED(); | NOTREACHED(); | ||||
} | } | ||||
-#endif // defined(OS_ANDROID) || defined(OS_LINUX) | -#endif // defined(OS_ANDROID) || defined(OS_LINUX) || defined(OS_CHROMEOS) | ||||
+#endif // defined(OS_ANDROID) || defined(OS_LINUX) || defined(OS_BSD) | +#endif // defined(OS_ANDROID) || defined(OS_LINUX) || defined(OS_CHROMEOS) || defined(OS_BSD) | ||||
} // namespace | } // namespace | ||||
-#if defined(OS_ANDROID) || defined(OS_LINUX) | -#if defined(OS_ANDROID) || defined(OS_LINUX) || defined(OS_CHROMEOS) | ||||
+#if defined(OS_ANDROID) || defined(OS_LINUX) || defined(OS_BSD) | +#if defined(OS_ANDROID) || defined(OS_LINUX) || defined(OS_CHROMEOS) || defined(OS_BSD) | ||||
// Probe capabilities of this device to determine whether we should participate | // Probe capabilities of this device to determine whether we should participate | ||||
// in the discardable memory backing trial. | // in the discardable memory backing trial. | ||||
@@ -87,18 +87,18 @@ DiscardableMemoryTrialGroup GetDiscardableMemoryBackin | @@ -87,18 +87,18 @@ DiscardableMemoryTrialGroup GetDiscardableMemoryBackin | ||||
DCHECK(DiscardableMemoryBackingFieldTrialIsEnabled()); | DCHECK(DiscardableMemoryBackingFieldTrialIsEnabled()); | ||||
return features::kDiscardableMemoryBackingParam.Get(); | return features::kDiscardableMemoryBackingParam.Get(); | ||||
} | } | ||||
-#endif // defined(OS_ANDROID) || defined(OS_LINUX) | -#endif // defined(OS_ANDROID) || defined(OS_LINUX) || defined(OS_CHROMEOS) | ||||
+#endif // defined(OS_ANDROID) || defined(OS_LINUX) || defined(OS_BSD) | +#endif // defined(OS_ANDROID) || defined(OS_LINUX) || defined(OS_CHROMEOS) || defined(OS_BSD) | ||||
DiscardableMemory::DiscardableMemory() = default; | DiscardableMemory::DiscardableMemory() = default; | ||||
DiscardableMemory::~DiscardableMemory() = default; | DiscardableMemory::~DiscardableMemory() = default; | ||||
DiscardableMemoryBacking GetDiscardableMemoryBacking() { | DiscardableMemoryBacking GetDiscardableMemoryBacking() { | ||||
-#if defined(OS_ANDROID) || defined(OS_LINUX) | -#if defined(OS_ANDROID) || defined(OS_LINUX) || defined(OS_CHROMEOS) | ||||
+#if defined(OS_ANDROID) || defined(OS_LINUX) || defined(OS_BSD) | +#if defined(OS_ANDROID) || defined(OS_LINUX) || defined(OS_CHROMEOS) || defined(OS_BSD) | ||||
if (DiscardableMemoryBackingFieldTrialIsEnabled()) { | if (DiscardableMemoryBackingFieldTrialIsEnabled()) { | ||||
return GetBackingForFieldTrial(); | return GetBackingForFieldTrial(); | ||||
} | } | ||||
-#endif // defined(OS_ANDROID) || defined(OS_LINUX) | -#endif // defined(OS_ANDROID) || defined(OS_LINUX) || defined(OS_CHROMEOS) | ||||
+#endif // defined(OS_ANDROID) || defined(OS_LINUX) || defined(OS_BSD) | +#endif // defined(OS_ANDROID) || defined(OS_LINUX) || defined(OS_CHROMEOS) || defined(OS_BSD) | ||||
#if defined(OS_ANDROID) | #if defined(OS_ANDROID) | ||||
if (ashmem_device_is_supported()) | if (ashmem_device_is_supported()) |