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

Unified Diff: src/heap.cc

Issue 157393002: Prevent race between GC and interrupts from other threads. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 10 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 e0b312067fc5c38013c36d76da9f69beae64c4a4..a40d5f18ff609942d6ee5999ce9eb19340426121 100644
--- a/src/heap.cc
+++ b/src/heap.cc
@@ -6081,7 +6081,13 @@ void Heap::IterateWeakRoots(ObjectVisitor* v, VisitMode mode) {
void Heap::IterateStrongRoots(ObjectVisitor* v, VisitMode mode) {
- v->VisitPointers(&roots_[0], &roots_[kStrongRootListLength]);
+ { // Avoid race with interrupts that set the stack limit on the root list.
+ // Note that GC does not actually care about the value of the stack limit
+ // as long as it is a smi. We may want to revisit this if this causes
+ // performance regressions by blocking the optimizing compiler thread.
+ ExecutionAccess access(isolate());
Michael Starzinger 2014/02/07 10:24:50 As discussed offline: This seems very much like a
+ v->VisitPointers(&roots_[0], &roots_[kStrongRootListLength]);
+ }
v->Synchronize(VisitorSynchronization::kStrongRootList);
v->VisitPointer(BitCast<Object**>(&hidden_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