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

Side by Side Diff: third_party/WebKit/Source/platform/heap/PageMemory.cpp

Issue 2819123002: Replace ASSERT_NOT_REACHED, and RELEASE_ASSERT in platform/heap (Closed)
Patch Set: fix build error Created 3 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 unified diff | Download patch
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "platform/heap/PageMemory.h" 5 #include "platform/heap/PageMemory.h"
6 6
7 #include "platform/heap/Heap.h" 7 #include "platform/heap/Heap.h"
8 #include "platform/wtf/AddressSanitizer.h" 8 #include "platform/wtf/AddressSanitizer.h"
9 #include "platform/wtf/Assertions.h" 9 #include "platform/wtf/Assertions.h"
10 #include "platform/wtf/Atomics.h" 10 #include "platform/wtf/Atomics.h"
(...skipping 153 matching lines...) Expand 10 before | Expand all | Expand 10 after
164 // Round up the requested size to nearest os page size. 164 // Round up the requested size to nearest os page size.
165 payload_size = RoundToOsPageSize(payload_size); 165 payload_size = RoundToOsPageSize(payload_size);
166 166
167 // Overallocate by 2 times OS page size to have space for a 167 // Overallocate by 2 times OS page size to have space for a
168 // guard page at the beginning and end of blink heap page. 168 // guard page at the beginning and end of blink heap page.
169 size_t allocation_size = payload_size + 2 * kBlinkGuardPageSize; 169 size_t allocation_size = payload_size + 2 * kBlinkGuardPageSize;
170 PageMemoryRegion* page_memory_region = 170 PageMemoryRegion* page_memory_region =
171 PageMemoryRegion::AllocateLargePage(allocation_size, region_tree); 171 PageMemoryRegion::AllocateLargePage(allocation_size, region_tree);
172 PageMemory* storage = 172 PageMemory* storage =
173 SetupPageMemoryInRegion(page_memory_region, 0, payload_size); 173 SetupPageMemoryInRegion(page_memory_region, 0, payload_size);
174 RELEASE_ASSERT(storage->Commit()); 174 CHECK(storage->Commit());
175 return storage; 175 return storage;
176 } 176 }
177 177
178 } // namespace blink 178 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698