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

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..2479709a45750a3a56fdab440fea54f26d6bb5d2 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(limit() >= top());
ulan 2015/11/19 12:36:10 CHECK_GE
Hannes Payer (out of office) 2015/11/19 14:24:22 Done.
+ 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