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

Unified Diff: test/cctest/heap/test-heap.cc

Issue 1964143004: Fix live bytes counter in large object space after right trimming. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 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 | « 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: test/cctest/heap/test-heap.cc
diff --git a/test/cctest/heap/test-heap.cc b/test/cctest/heap/test-heap.cc
index 030ef5c6160a3121662e43376eb583f1b372292b..14c91153c766f35b24fac0b4f54355915c0c788c 100644
--- a/test/cctest/heap/test-heap.cc
+++ b/test/cctest/heap/test-heap.cc
@@ -6743,5 +6743,18 @@ TEST(Regress598319) {
}
}
+TEST(Regress609761) {
+ CcTest::InitializeVM();
+ v8::HandleScope scope(CcTest::isolate());
+ Heap* heap = CcTest::heap();
+ Isolate* isolate = heap->isolate();
+
+ intptr_t size_before = heap->SizeOfObjects();
+ Handle<FixedArray> array = isolate->factory()->NewFixedArray(200000);
+ array->Shrink(1);
+ intptr_t size_after = heap->SizeOfObjects();
+ CHECK_EQ(size_after, size_before + array->Size());
+}
+
} // namespace internal
} // namespace v8
« 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