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

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

Issue 979003003: Only reference constant root list entries in the snapshot. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: fix windows build Created 5 years, 10 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/x64/macro-assembler-x64.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/cctest/test-heap.cc
diff --git a/test/cctest/test-heap.cc b/test/cctest/test-heap.cc
index d7c24156a3d2aed5fad23b591898cf7e510f4902..5ddbc99fea932c4a65e6ac40946cc67da05541c6 100644
--- a/test/cctest/test-heap.cc
+++ b/test/cctest/test-heap.cc
@@ -5092,3 +5092,14 @@ TEST(PathTracer) {
CcTest::i_isolate()->heap()->TracePathToObject(*o);
}
#endif // DEBUG
+
+
+TEST(WritableVsImmortalRoots) {
+ for (int i = 0; i < Heap::kStrongRootListLength; ++i) {
+ Heap::RootListIndex root_index = static_cast<Heap::RootListIndex>(i);
+ bool writable = Heap::RootCanBeWrittenAfterInitialization(root_index);
+ bool immortal = Heap::RootIsImmortalImmovable(root_index);
+ // A root value can be writable, immortal, or neither, but not both.
+ CHECK(!immortal || !writable);
+ }
+}
« no previous file with comments | « src/x64/macro-assembler-x64.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698