Index: Source/platform/heap/Heap.cpp |
diff --git a/Source/platform/heap/Heap.cpp b/Source/platform/heap/Heap.cpp |
index 6a11b328b0382f56ab08705c96fc94ddba2ac951..4b5d24ac72c5084268cfc9dc091039b8212ff32e 100644 |
--- a/Source/platform/heap/Heap.cpp |
+++ b/Source/platform/heap/Heap.cpp |
@@ -1314,6 +1314,7 @@ public: |
return; |
header->mark(); |
#if ENABLE(GC_TRACING) |
+ MutexLocker locker(objectGraphMutex()); |
String className(classOf(objectPointer)); |
{ |
LiveObjectMap::AddResult result = currentlyLive().add(className, LiveObjectSet()); |
@@ -1469,6 +1470,12 @@ public: |
objectsToFindPath().add(reinterpret_cast<uintptr_t>(p)); |
} |
+ static Mutex& objectGraphMutex() |
+ { |
+ AtomicallyInitializedStatic(Mutex&, mutex = *new Mutex); |
tkent
2014/05/29 12:43:05
This looks unnatural.
Does the following work?
|
+ return mutex; |
+ } |
+ |
static LiveObjectMap& previouslyLive() |
{ |
DEFINE_STATIC_LOCAL(LiveObjectMap, map, ()); |