summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Source/WebCore/platform/graphics/android/layers/LayerAndroid.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/Source/WebCore/platform/graphics/android/layers/LayerAndroid.cpp b/Source/WebCore/platform/graphics/android/layers/LayerAndroid.cpp
index a652d3e..4dbb9ba 100644
--- a/Source/WebCore/platform/graphics/android/layers/LayerAndroid.cpp
+++ b/Source/WebCore/platform/graphics/android/layers/LayerAndroid.cpp
@@ -173,7 +173,9 @@ LayerAndroid::LayerAndroid(const LayerAndroid& layer) : Layer(layer),
KeyframesMap::const_iterator end = layer.m_animations.end();
for (KeyframesMap::const_iterator it = layer.m_animations.begin(); it != end; ++it) {
- m_animations.add(it->first, it->second);
+ // Deep copy the key's string, to avoid cross-thread refptr use
+ pair<String, int> newKey(it->first.first.threadsafeCopy(), it->first.second);
+ m_animations.add(newKey, it->second);
}
if (layer.m_replicatedLayer) {