Index: content/common/host_discardable_shared_memory_manager.cc |
diff --git a/content/common/host_discardable_shared_memory_manager.cc b/content/common/host_discardable_shared_memory_manager.cc |
index aafd5d6376f80eeacd788307ae51efe6fcaaafdf..e349fca4171c1a32a1daf1ef22f50913e1d7c89f 100644 |
--- a/content/common/host_discardable_shared_memory_manager.cc |
+++ b/content/common/host_discardable_shared_memory_manager.cc |
@@ -164,7 +164,8 @@ HostDiscardableSharedMemoryManager::MemorySegment::~MemorySegment() { |
} |
HostDiscardableSharedMemoryManager::HostDiscardableSharedMemoryManager() |
- : memory_limit_(GetDefaultMemoryLimit()), |
+ : default_memory_limit_(GetDefaultMemoryLimit()), |
bashi
2016/10/04 03:13:10
Though GetDefaultMemoryLimit() could be dynamicall
|
+ memory_limit_(default_memory_limit_), |
bytes_allocated_(0), |
memory_pressure_listener_(new base::MemoryPressureListener( |
base::Bind(&HostDiscardableSharedMemoryManager::OnMemoryPressure, |
@@ -352,7 +353,7 @@ void HostDiscardableSharedMemoryManager::OnMemoryStateChange( |
base::MemoryState state) { |
switch (state) { |
case base::MemoryState::NORMAL: |
- SetMemoryLimit(GetDefaultMemoryLimit()); |
+ SetMemoryLimit(default_memory_limit_); |
break; |
case base::MemoryState::THROTTLED: |
SetMemoryLimit(0); |