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

Unified Diff: src/heap/mark-compact.cc

Issue 1163073002: Replace ad-hoc weakness in prototype transitions with WeakCell. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Fix crash 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 | src/heap/objects-visiting-inl.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/heap/mark-compact.cc
diff --git a/src/heap/mark-compact.cc b/src/heap/mark-compact.cc
index 521be78e2eff9976cd0db5d49e27ca5888c958db..beea67080242adcee529bacb06357c408b750f6d 100644
--- a/src/heap/mark-compact.cc
+++ b/src/heap/mark-compact.cc
@@ -2373,11 +2373,10 @@ void MarkCompactCollector::ClearNonLivePrototypeTransitions(Map* map) {
const int header = TransitionArray::kProtoTransitionHeaderSize;
int new_number_of_transitions = 0;
for (int i = 0; i < number_of_transitions; i++) {
- Object* cached_map = prototype_transitions->get(header + i);
- if (IsMarked(cached_map)) {
+ Object* cell = prototype_transitions->get(header + i);
+ if (!WeakCell::cast(cell)->cleared()) {
if (new_number_of_transitions != i) {
- prototype_transitions->set(header + new_number_of_transitions,
- cached_map, SKIP_WRITE_BARRIER);
+ prototype_transitions->set(header + new_number_of_transitions, cell);
}
new_number_of_transitions++;
}
« no previous file with comments | « no previous file | src/heap/objects-visiting-inl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698