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

Unified Diff: third_party/WebKit/Source/platform/heap/HeapPage.cpp

Issue 2908463002: Enable heap compaction on all 'container' arenas. (Closed)
Patch Set: add checks for compaction being activated. Created 3 years, 7 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 | « third_party/WebKit/Source/platform/heap/HeapCompactTest.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/platform/heap/HeapPage.cpp
diff --git a/third_party/WebKit/Source/platform/heap/HeapPage.cpp b/third_party/WebKit/Source/platform/heap/HeapPage.cpp
index 2d1b043d3a5271d177d73f9b56d0a5fe14ce4ec9..d632988f0987021f7a9111030195c8b57365c5c3 100644
--- a/third_party/WebKit/Source/platform/heap/HeapPage.cpp
+++ b/third_party/WebKit/Source/platform/heap/HeapPage.cpp
@@ -504,10 +504,15 @@ void NormalPageArena::SweepAndCompact() {
normal_page->SweepAndCompact(context);
}
+ // All pages were empty; nothing to compact.
+ if (!context.current_page_) {
+ heap.Compaction()->FinishedArenaCompaction(this, 0, 0);
+ return;
+ }
+
size_t freed_size = 0;
size_t freed_page_count = 0;
- DCHECK(context.current_page_);
// If the current page hasn't been allocated into, add it to the available
// list, for subsequent release below.
size_t allocation_point = context.allocation_point_;
« no previous file with comments | « third_party/WebKit/Source/platform/heap/HeapCompactTest.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698