| Index: third_party/WebKit/Source/platform/heap/Heap.h
|
| diff --git a/third_party/WebKit/Source/platform/heap/Heap.h b/third_party/WebKit/Source/platform/heap/Heap.h
|
| index 933037838926c0f9edaac48ea464a3892636c7b1..24dd654eb92b1ae47477925a87d3867f6f72798c 100644
|
| --- a/third_party/WebKit/Source/platform/heap/Heap.h
|
| +++ b/third_party/WebKit/Source/platform/heap/Heap.h
|
| @@ -336,13 +336,10 @@ public:
|
|
|
| static inline size_t allocationSizeFromSize(size_t size)
|
| {
|
| - // Check the size before computing the actual allocation size. The
|
| - // allocation size calculation can overflow for large sizes and the check
|
| - // therefore has to happen before any calculation on the size.
|
| - RELEASE_ASSERT(size < maxHeapObjectSize);
|
| -
|
| // Add space for header.
|
| size_t allocationSize = size + sizeof(HeapObjectHeader);
|
| + // The allocation size calculation can overflow for large sizes.
|
| + RELEASE_ASSERT(allocationSize > size);
|
| // Align size with allocation granularity.
|
| allocationSize = (allocationSize + allocationMask) & ~allocationMask;
|
| return allocationSize;
|
|
|