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

Unified Diff: Source/wtf/DefaultAllocator.cpp

Issue 251163002: Deinline PartitionAlloc from DefaultAllocator to reduce code size (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@dummy
Patch Set: fix linking by properly exporting symbols Created 6 years, 8 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 | « Source/wtf/DefaultAllocator.h ('k') | Source/wtf/wtf.gypi » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/wtf/DefaultAllocator.cpp
diff --git a/Source/modules/quota/StorageInfo.cpp b/Source/wtf/DefaultAllocator.cpp
similarity index 82%
copy from Source/modules/quota/StorageInfo.cpp
copy to Source/wtf/DefaultAllocator.cpp
index 0a51cee7fb5e6183740935885ccd792d1e347b97..5a7c28cb0d5fb3a32a9e8cddd56043cf6f029330 100644
--- a/Source/modules/quota/StorageInfo.cpp
+++ b/Source/wtf/DefaultAllocator.cpp
@@ -29,19 +29,20 @@
*/
#include "config.h"
-#include "modules/quota/StorageInfo.h"
+#include "wtf/DefaultAllocator.h"
-namespace WebCore {
+#include "wtf/PartitionAlloc.h"
-StorageInfo::StorageInfo(unsigned long long usage, unsigned long long quota)
- : m_usage(usage)
- , m_quota(quota)
+namespace WTF {
+
+void* DefaultAllocator::backingAllocate(size_t size)
{
- ScriptWrappable::init(this);
+ return partitionAllocGeneric(Partitions::getBufferPartition(), size);
}
-StorageInfo::~StorageInfo()
+void DefaultAllocator::backingFree(void* address)
{
+ partitionFreeGeneric(Partitions::getBufferPartition(), address);
}
-} // namespace WebCore
+} // namespace WTF
« no previous file with comments | « Source/wtf/DefaultAllocator.h ('k') | Source/wtf/wtf.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698