diff options
author | Chris Craik <ccraik@google.com> | 2012-10-08 13:52:40 -0700 |
---|---|---|
committer | Chris Craik <ccraik@google.com> | 2012-10-08 13:52:40 -0700 |
commit | 3430821e4d58d0df4a5d5c62c62ed2dbfef348c0 (patch) | |
tree | 42cc0c08f39f241c7b3884d84d64674679edb048 | |
parent | df108a70a4ac13a2f67592afc32ef0be0054db2d (diff) | |
download | external_webkit-3430821e4d58d0df4a5d5c62c62ed2dbfef348c0.zip external_webkit-3430821e4d58d0df4a5d5c62c62ed2dbfef348c0.tar.gz external_webkit-3430821e4d58d0df4a5d5c62c62ed2dbfef348c0.tar.bz2 |
Deep copy animation keyframe names
bug:7266561
this makes them safe for cross-thread usage
Change-Id: Ib3a49999aa5c3e740127ba684f3d4887e1ad5cb9
-rw-r--r-- | Source/WebCore/platform/graphics/android/layers/LayerAndroid.cpp | 4 |
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) { |