Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(609)

Unified Diff: third_party/WebKit/Source/core/svg/SVGElement.cpp

Issue 1487813002: Avoid race-warning for access to animatableAttributes (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: A-ha Created 5 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/core/svg/SVGElement.cpp
diff --git a/third_party/WebKit/Source/core/svg/SVGElement.cpp b/third_party/WebKit/Source/core/svg/SVGElement.cpp
index 5024d320e456a34ab3ac57681c10f25116eb4054..6df1ee97f8c21abcdb686ecd46db9d68db1e5a32 100644
--- a/third_party/WebKit/Source/core/svg/SVGElement.cpp
+++ b/third_party/WebKit/Source/core/svg/SVGElement.cpp
@@ -49,6 +49,7 @@
#include "core/svg/SVGUseElement.h"
#include "platform/JSONValues.h"
#include "wtf/TemporaryChange.h"
+#include "wtf/Threading.h"
namespace blink {
@@ -981,7 +982,9 @@ SVGElement::InstanceUpdateBlocker::~InstanceUpdateBlocker()
#if ENABLE(ASSERT)
bool SVGElement::isAnimatableAttribute(const QualifiedName& name) const
{
- DEFINE_STATIC_LOCAL(HashSet<QualifiedName>, animatableAttributes, ());
+ // This static is atomically initialized to dodge a warning about
+ // a race when dumping debug data for a layer.
+ AtomicallyInitializedStaticReference(HashSet<QualifiedName>, animatableAttributes, new HashSet<QualifiedName>());
if (animatableAttributes.isEmpty()) {
const QualifiedName* const animatableAttrs[] = {
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698