Fix race between VisitSmiRoots and SetStackLimit.

R=hpayer@chromium.org

Review URL: https://codereview.chromium.org/198833006

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@20026 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
This commit is contained in:
yangguo@chromium.org 2014-03-18 12:21:07 +00:00
parent 9b28aed3f6
commit 5bca14a33e

View File

@ -6161,6 +6161,8 @@ void Heap::IterateWeakRoots(ObjectVisitor* v, VisitMode mode) {
void Heap::IterateSmiRoots(ObjectVisitor* v) {
// Acquire execution access since we are going to read stack limit values.
ExecutionAccess access(isolate());
v->VisitPointers(&roots_[kSmiRootsStart], &roots_[kRootListLength]);
v->Synchronize(VisitorSynchronization::kSmiRootList);
}