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

Unified Diff: src/heap.cc

Issue 247063002: Cons string maps must be marked as unstable. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 8 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.cc
diff --git a/src/heap.cc b/src/heap.cc
index aadb83e2a8e274491dfa5322f362f209cfa4719d..3b7a262ec1f11d1665878956bef300965218d77e 100644
--- a/src/heap.cc
+++ b/src/heap.cc
@@ -2586,7 +2586,11 @@ bool Heap::CreateInitialMaps() {
{ MaybeObject* maybe_obj = AllocateMap(entry.type, entry.size);
if (!maybe_obj->ToObject(&obj)) return false;
}
- roots_[entry.index] = Map::cast(obj);
+ // Mark cons string maps as unstable, because their objects can change
+ // maps during GC.
+ Map* map = Map::cast(obj);
+ if (StringShape(entry.type).IsCons()) map->mark_unstable();
+ roots_[entry.index] = map;
}
ALLOCATE_VARSIZE_MAP(STRING_TYPE, undetectable_string)
« 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