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

Unified Diff: src/heap/spaces.cc

Issue 1455273003: [heap] Enforce size checks in allocation stats. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 1 month 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 | « src/heap/spaces.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/heap/spaces.cc
diff --git a/src/heap/spaces.cc b/src/heap/spaces.cc
index eeaf39aedc6838ffb7d92c91c05d4cadf29dd861..1953fae8ee434329ddd64c2123658c7f26bc4d85 100644
--- a/src/heap/spaces.cc
+++ b/src/heap/spaces.cc
@@ -2707,7 +2707,8 @@ void PagedSpace::PrepareForMarkCompact() {
intptr_t PagedSpace::SizeOfObjects() {
const intptr_t size = Size() - (limit() - top());
- DCHECK_GE(size, 0);
+ CHECK_GE(limit(), top());
+ CHECK_GE(size, 0);
USE(size);
return size;
}
« no previous file with comments | « src/heap/spaces.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698