Index: webkit/child/webkitplatformsupport_child_impl.cc |
diff --git a/webkit/child/webkitplatformsupport_child_impl.cc b/webkit/child/webkitplatformsupport_child_impl.cc |
index 1df9a12518946f5e4aa02fd877b45175230a1edc..849dcb7b0a8fb5ba854c02209a63a857fa4f1794 100644 |
--- a/webkit/child/webkitplatformsupport_child_impl.cc |
+++ b/webkit/child/webkitplatformsupport_child_impl.cc |
@@ -95,11 +95,7 @@ WebKit::WebDiscardableMemory* |
WebKitPlatformSupportChildImpl::allocateAndLockDiscardableMemory(size_t bytes) { |
if (!base::DiscardableMemory::Supported()) |
return NULL; |
- scoped_ptr<WebDiscardableMemoryImpl> discardable( |
- new WebDiscardableMemoryImpl()); |
- if (discardable->InitializeAndLock(bytes)) |
- return discardable.release(); |
- return NULL; |
+ return WebDiscardableMemoryImpl::CreateLockedMemory(bytes).release(); |
} |
// static |