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

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

Issue 1169733002: Revert of Replace ad-hoc weakness in prototype transitions with WeakCell. (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 | 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 beea67080242adcee529bacb06357c408b750f6d..521be78e2eff9976cd0db5d49e27ca5888c958db 100644
--- a/src/heap/mark-compact.cc
+++ b/src/heap/mark-compact.cc
@@ -2373,10 +2373,11 @@
const int header = TransitionArray::kProtoTransitionHeaderSize;
int new_number_of_transitions = 0;
for (int i = 0; i < number_of_transitions; i++) {
- Object* cell = prototype_transitions->get(header + i);
- if (!WeakCell::cast(cell)->cleared()) {
+ Object* cached_map = prototype_transitions->get(header + i);
+ if (IsMarked(cached_map)) {
if (new_number_of_transitions != i) {
- prototype_transitions->set(header + new_number_of_transitions, cell);
+ prototype_transitions->set(header + new_number_of_transitions,
+ cached_map, SKIP_WRITE_BARRIER);
}
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