| Index: Source/core/dom/DatasetDOMStringMap.cpp
|
| diff --git a/Source/core/dom/DatasetDOMStringMap.cpp b/Source/core/dom/DatasetDOMStringMap.cpp
|
| index f9cd4eec6d78473b65a590e135e358bb7f7c5228..14c082d5ec7fbcdbee0a3e6d0239f861338086ef 100644
|
| --- a/Source/core/dom/DatasetDOMStringMap.cpp
|
| +++ b/Source/core/dom/DatasetDOMStringMap.cpp
|
| @@ -107,7 +107,9 @@ static bool isValidPropertyName(const String& name)
|
| return true;
|
| }
|
|
|
| -static String convertPropertyNameToAttributeName(const String& name)
|
| +// This returns an AtomicString because attribute names are always stored
|
| +// as AtomicString types in Element (see setAttribute()).
|
| +static AtomicString convertPropertyNameToAttributeName(const String& name)
|
| {
|
| StringBuilder builder;
|
| builder.append("data-");
|
| @@ -122,7 +124,7 @@ static String convertPropertyNameToAttributeName(const String& name)
|
| builder.append(character);
|
| }
|
|
|
| - return builder.toString();
|
| + return builder.toAtomicString();
|
| }
|
|
|
| void DatasetDOMStringMap::ref()
|
| @@ -185,13 +187,13 @@ void DatasetDOMStringMap::setItem(const String& name, const String& value, Excep
|
| return;
|
| }
|
|
|
| - m_element->setAttribute(convertPropertyNameToAttributeName(name), value, exceptionState);
|
| + m_element->setAttribute(convertPropertyNameToAttributeName(name), AtomicString(value), exceptionState);
|
| }
|
|
|
| bool DatasetDOMStringMap::deleteItem(const String& name)
|
| {
|
| if (isValidPropertyName(name)) {
|
| - String attributeName = convertPropertyNameToAttributeName(name);
|
| + AtomicString attributeName = convertPropertyNameToAttributeName(name);
|
| if (m_element->hasAttribute(attributeName)) {
|
| m_element->removeAttribute(attributeName);
|
| return true;
|
|
|