Chromium Code Reviews| Index: base/memory/discardable_memory.cc |
| diff --git a/base/memory/discardable_memory.cc b/base/memory/discardable_memory.cc |
| index 33f9e19cdeee523f7b99a53a8452ef23f0f569f0..06a36ecbcdffbb9b593e499da6ec0dbd358d89be 100644 |
| --- a/base/memory/discardable_memory.cc |
| +++ b/base/memory/discardable_memory.cc |
| @@ -16,51 +16,13 @@ DiscardableMemory::DiscardableMemory() |
| , fd_(-1) |
| #endif // OS_ANDROID |
| { |
| - DCHECK(Supported()); |
| } |
| void* DiscardableMemory::Memory() const { |
| - DCHECK(is_locked_); |
| + if (!is_locked_) |
| + // This is a fatal error, and we must die. |
| + CHECK(false); |
|
Avi (use Gerrit)
2013/06/18 00:00:46
Braces if the if spans more than one line. (Even i
|
| return memory_; |
| } |
| -// Stub implementations for platforms that don't support discardable memory. |
| - |
| -#if !defined(OS_ANDROID) && !defined(OS_MACOSX) |
| - |
| -DiscardableMemory::~DiscardableMemory() { |
| - NOTIMPLEMENTED(); |
| -} |
| - |
| -// static |
| -bool DiscardableMemory::Supported() { |
| - return false; |
| -} |
| - |
| -bool DiscardableMemory::InitializeAndLock(size_t size) { |
| - NOTIMPLEMENTED(); |
| - return false; |
| -} |
| - |
| -LockDiscardableMemoryStatus DiscardableMemory::Lock() { |
| - NOTIMPLEMENTED(); |
| - return DISCARDABLE_MEMORY_FAILED; |
| -} |
| - |
| -void DiscardableMemory::Unlock() { |
| - NOTIMPLEMENTED(); |
| -} |
| - |
| -// static |
| -bool DiscardableMemory::PurgeForTestingSupported() { |
| - return false; |
| -} |
| - |
| -// static |
| -void DiscardableMemory::PurgeForTesting() { |
| - NOTIMPLEMENTED(); |
| -} |
| - |
| -#endif // OS_* |
| - |
| } // namespace base |