| Index: third_party/WebKit/Source/platform/heap/ThreadState.cpp
|
| diff --git a/third_party/WebKit/Source/platform/heap/ThreadState.cpp b/third_party/WebKit/Source/platform/heap/ThreadState.cpp
|
| index 2c2b2630b7007c9910fcc1ae6a3226be81463c06..a8716456f3b924dcc1688d170aafe2a800546818 100644
|
| --- a/third_party/WebKit/Source/platform/heap/ThreadState.cpp
|
| +++ b/third_party/WebKit/Source/platform/heap/ThreadState.cpp
|
| @@ -1453,9 +1453,11 @@ void ThreadState::CollectGarbage(BlinkGC::StackState stack_state,
|
| GCForbiddenScope gc_forbidden_scope(this);
|
|
|
| {
|
| - // Access to the CrossThreadPersistentRegion has to be prevented while in
|
| - // the marking phase because otherwise other threads may allocate or free
|
| - // PersistentNodes and we can't handle that.
|
| + // Access to the CrossThreadPersistentRegion has to be prevented
|
| + // while in the marking phase because otherwise other threads may
|
| + // allocate or free PersistentNodes and we can't handle
|
| + // that. Grabbing this lock also prevents non-attached threads
|
| + // from accessing any GCed heap while a GC runs.
|
| CrossThreadPersistentRegion::LockScope persistent_lock(
|
| ProcessHeap::GetCrossThreadPersistentRegion());
|
| {
|
|
|