Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(307)

Unified Diff: webkit/child/webkitplatformsupport_child_impl.cc

Issue 114923005: base: Discardable memory types. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Add switches::kUseDiscardableMemory to kForwardSwitches Created 6 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « webkit/child/web_discardable_memory_impl.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webkit/child/webkitplatformsupport_child_impl.cc
diff --git a/webkit/child/webkitplatformsupport_child_impl.cc b/webkit/child/webkitplatformsupport_child_impl.cc
index 3bb2b1954cb9d14d475b57ceec74e4e1dd31244b..09cd0b2d17f9b937a083be29d7ba69e76ecf6fee 100644
--- a/webkit/child/webkitplatformsupport_child_impl.cc
+++ b/webkit/child/webkitplatformsupport_child_impl.cc
@@ -93,7 +93,9 @@ void WebKitPlatformSupportChildImpl::didStopWorkerRunLoop(
blink::WebDiscardableMemory*
WebKitPlatformSupportChildImpl::allocateAndLockDiscardableMemory(size_t bytes) {
- if (!base::DiscardableMemory::SupportedNatively())
+ base::DiscardableMemoryType type =
+ base::DiscardableMemory::GetPreferredType();
+ if (type == base::DISCARDABLE_MEMORY_TYPE_EMULATED)
return NULL;
return WebDiscardableMemoryImpl::CreateLockedMemory(bytes).release();
}
« no previous file with comments | « webkit/child/web_discardable_memory_impl.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698