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

Unified Diff: src/heap/slot-set.h

Issue 2397473004: [heap] Do not touch pre-freed typed slot set memory anymore. (Closed)
Patch Set: Created 4 years, 2 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/slot-set.h
diff --git a/src/heap/slot-set.h b/src/heap/slot-set.h
index f374c1d684696213b3c7c9f3a7c1ad72c03d9a14..017667b48210781e15269bf038834964528beebc 100644
--- a/src/heap/slot-set.h
+++ b/src/heap/slot-set.h
@@ -401,20 +401,21 @@ class TypedSlotSet {
}
}
+ Chunk* next = chunk->next.Value();
if (mode == PREFREE_EMPTY_CHUNKS && empty) {
// We remove the chunk from the list but let it still point its next
// chunk to allow concurrent iteration.
if (previous) {
- previous->next.SetValue(chunk->next.Value());
+ previous->next.SetValue(next);
} else {
- chunk_.SetValue(chunk->next.Value());
+ chunk_.SetValue(next);
}
base::LockGuard<base::Mutex> guard(&to_be_freed_chunks_mutex_);
to_be_freed_chunks_.push(chunk);
} else {
previous = chunk;
}
- chunk = chunk->next.Value();
+ chunk = next;
}
return new_count;
}
« 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