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

Unified Diff: webkit/child/webkitplatformsupport_child_impl.cc

Issue 60273004: webkit: Avoid use of discardable memory unless supported natively. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 1 month 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 | « no previous file | 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 c23c404c37b4d73f8c173e2be6008908e22f6cf3..900cd52774ce31490c6b0acea91d30c2df2f113f 100644
--- a/webkit/child/webkitplatformsupport_child_impl.cc
+++ b/webkit/child/webkitplatformsupport_child_impl.cc
@@ -93,6 +93,8 @@ void WebKitPlatformSupportChildImpl::didStopWorkerRunLoop(
WebKit::WebDiscardableMemory*
WebKitPlatformSupportChildImpl::allocateAndLockDiscardableMemory(size_t bytes) {
+ if (!base::DiscardableMemory::SupportedNatively())
+ return NULL;
return WebDiscardableMemoryImpl::CreateLockedMemory(bytes).release();
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698