| Index: Source/platform/heap/ThreadState.cpp
|
| diff --git a/Source/platform/heap/ThreadState.cpp b/Source/platform/heap/ThreadState.cpp
|
| index 87d0c40e847b614df6ebce10370292c8826cf9dc..75a6c81ed865246377001d1202159aba14d2abff 100644
|
| --- a/Source/platform/heap/ThreadState.cpp
|
| +++ b/Source/platform/heap/ThreadState.cpp
|
| @@ -891,4 +891,24 @@ ThreadState::AttachedThreadStateSet& ThreadState::attachedThreads()
|
| return threads;
|
| }
|
|
|
| +#if ENABLE(GC_TRACING)
|
| +const GCInfo* ThreadState::findGCInfoFromAllThreads(Address address)
|
| +{
|
| + bool needLockForIteration = !isAnyThreadInGC();
|
| + if (needLockForIteration)
|
| + threadAttachMutex().lock();
|
| +
|
| + ThreadState::AttachedThreadStateSet& threads = attachedThreads();
|
| + for (ThreadState::AttachedThreadStateSet::iterator it = threads.begin(), end = threads.end(); it != end; ++it) {
|
| + if (const GCInfo* gcInfo = (*it)->findGCInfo(address)) {
|
| + if (needLockForIteration)
|
| + threadAttachMutex().unlock();
|
| + return gcInfo;
|
| + }
|
| + }
|
| + if (needLockForIteration)
|
| + threadAttachMutex().unlock();
|
| + return 0;
|
| +}
|
| +#endif
|
| }
|
|
|