summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEmanuele Aina <emanuele.aina@collabora.com>2015-04-08 12:18:05 (GMT)
committerEmanuele Aina <emanuele.aina@collabora.com>2015-04-08 12:18:05 (GMT)
commit0b2f3b61d539d04178fdeda64247c29d26eb76c3 (patch)
tree0b4a5ce8f8eb0dcc69499344b81c9d9fc1581b33
parentc502c0bf1a4588770997f2579a0b5a5a0fb3b185 (diff)
downloadWebKit-0b2f3b61d539d04178fdeda64247c29d26eb76c3.tar.gz
WebKit-0b2f3b61d539d04178fdeda64247c29d26eb76c3.tar.xz
[TBS] Add missing lock when increasing pending updates count
In some particular cases it led to deadlocks.
-rw-r--r--Source/WebCore/platform/graphics/cairo/TileCairo.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/Source/WebCore/platform/graphics/cairo/TileCairo.cpp b/Source/WebCore/platform/graphics/cairo/TileCairo.cpp
index b1bce8e..c1c77ea 100644
--- a/Source/WebCore/platform/graphics/cairo/TileCairo.cpp
+++ b/Source/WebCore/platform/graphics/cairo/TileCairo.cpp
@@ -276,6 +276,7 @@ void TileCairo::createUpdateThreadsIfNeeded()
void TileCairo::queueUpdate(PassRefPtr<cairo_surface_t> surface, const Region& region)
{
+ std::lock_guard<std::mutex> lock(m_updateMutex);
m_updatePending++;
s_updateQueue.append(std::make_unique<QueuedUpdate>(this, surface, region));
}