From 3430821e4d58d0df4a5d5c62c62ed2dbfef348c0 Mon Sep 17 00:00:00 2001 From: Chris Craik Date: Mon, 8 Oct 2012 13:52:40 -0700 Subject: Deep copy animation keyframe names bug:7266561 this makes them safe for cross-thread usage Change-Id: Ib3a49999aa5c3e740127ba684f3d4887e1ad5cb9 --- Source/WebCore/platform/graphics/android/layers/LayerAndroid.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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 newKey(it->first.first.threadsafeCopy(), it->first.second); + m_animations.add(newKey, it->second); } if (layer.m_replicatedLayer) { -- cgit v1.1