| Index: third_party/WebKit/Source/platform/wtf/allocator/Partitions.h
|
| diff --git a/third_party/WebKit/Source/platform/wtf/allocator/Partitions.h b/third_party/WebKit/Source/platform/wtf/allocator/Partitions.h
|
| index 67e87bb4615d158905444d7b7b6fb8bbdea56237..2b17085ca6920c5b13560c13b23add48b3f9597a 100644
|
| --- a/third_party/WebKit/Source/platform/wtf/allocator/Partitions.h
|
| +++ b/third_party/WebKit/Source/platform/wtf/allocator/Partitions.h
|
| @@ -34,6 +34,7 @@
|
| #include <string.h>
|
| #include "base/allocator/partition_allocator/partition_alloc.h"
|
| #include "base/allocator/partition_allocator/spin_lock.h"
|
| +#include "base/numerics/checked_math.h"
|
| #include "platform/wtf/Assertions.h"
|
| #include "platform/wtf/WTF.h"
|
| #include "platform/wtf/WTFExport.h"
|
| @@ -68,11 +69,18 @@ class WTF_EXPORT Partitions {
|
| NOTREACHED();
|
| return nullptr;
|
| }
|
| +
|
| ALWAYS_INLINE static base::PartitionRoot* LayoutPartition() {
|
| DCHECK(initialized_);
|
| return layout_allocator_.root();
|
| }
|
|
|
| + ALWAYS_INLINE static size_t ComputeAllocationSize(size_t count, size_t size) {
|
| + base::CheckedNumeric<size_t> total = count;
|
| + total *= size;
|
| + return total.ValueOrDie();
|
| + }
|
| +
|
| static size_t CurrentDOMMemoryUsage() {
|
| NOTREACHED();
|
| return 0;
|
|
|