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

Unified Diff: src/heap/heap.cc

Issue 1180043002: [heap] All immutable roots are either smis or immovable heap objects. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 6 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/heap/heap.cc
diff --git a/src/heap/heap.cc b/src/heap/heap.cc
index bc46cc2cff46d51d2ebaed81bce29d7476d25560..8fb72dc6d9b45b9b82cd92db61873ba0524635f0 100644
--- a/src/heap/heap.cc
+++ b/src/heap/heap.cc
@@ -3316,8 +3316,11 @@ bool Heap::RootCanBeWrittenAfterInitialization(Heap::RootListIndex root_index) {
bool Heap::RootCanBeTreatedAsConstant(RootListIndex root_index) {
- return !RootCanBeWrittenAfterInitialization(root_index) &&
- !InNewSpace(roots_array_start()[root_index]);
+ if (!RootCanBeWrittenAfterInitialization(root_index)) {
+ DCHECK(!InNewSpace(roots_array_start()[root_index]));
+ return true;
+ }
+ return false;
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698