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

Unified Diff: third_party/WebKit/Source/core/animation/PropertyHandle.h

Issue 2390203002: Use AtomicString instead of StringImpl* in PropertyHandle (Closed)
Patch Set: Created 4 years, 2 months 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
Index: third_party/WebKit/Source/core/animation/PropertyHandle.h
diff --git a/third_party/WebKit/Source/core/animation/PropertyHandle.h b/third_party/WebKit/Source/core/animation/PropertyHandle.h
index be8e910769111e02ae4eb33829281105acacd283..aca3580476ce43a76f9f1f9ee149bf868c936ce3 100644
--- a/third_party/WebKit/Source/core/animation/PropertyHandle.h
+++ b/third_party/WebKit/Source/core/animation/PropertyHandle.h
@@ -28,7 +28,8 @@ class CORE_EXPORT PropertyHandle {
explicit PropertyHandle(const AtomicString& propertyName)
: m_handleType(HandleCSSCustomProperty),
- m_propertyName(propertyName.impl()) {}
+ m_svgAttribute(nullptr),
+ m_propertyName(propertyName) {}
explicit PropertyHandle(const QualifiedName& attributeName)
: m_handleType(HandleSVGAttribute), m_svgAttribute(&attributeName) {}
@@ -52,9 +53,9 @@ class CORE_EXPORT PropertyHandle {
bool isCSSCustomProperty() const {
return m_handleType == HandleCSSCustomProperty;
}
- AtomicString customPropertyName() const {
+ const AtomicString& customPropertyName() const {
DCHECK(isCSSCustomProperty());
- return AtomicString(m_propertyName);
+ return m_propertyName;
}
bool isPresentationAttribute() const {
@@ -100,8 +101,8 @@ class CORE_EXPORT PropertyHandle {
union {
CSSPropertyID m_cssProperty;
const QualifiedName* m_svgAttribute;
- StringImpl* m_propertyName;
};
+ AtomicString m_propertyName;
friend struct ::WTF::HashTraits<blink::PropertyHandle>;
};
@@ -130,7 +131,7 @@ struct DefaultHash<blink::PropertyHandle> {
template <>
struct HashTraits<blink::PropertyHandle>
: SimpleClassHashTraits<blink::PropertyHandle> {
- static const bool needsDestruction = false;
+ static const bool needsDestruction = true;
static void constructDeletedValue(blink::PropertyHandle& slot, bool) {
new (NotNull, &slot) blink::PropertyHandle(
blink::PropertyHandle::deletedValueForHashTraits());

Powered by Google App Engine
This is Rietveld 408576698