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

Unified Diff: Source/core/dom/Attr.cpp

Issue 112843002: Make calls to AtomicString(const String&) explicit in dom/ (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Added comments Created 7 years 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 | Source/core/dom/ClassNodeList.h » ('j') | Source/core/dom/NamedFlowCollection.cpp » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/dom/Attr.cpp
diff --git a/Source/core/dom/Attr.cpp b/Source/core/dom/Attr.cpp
index b67b2818f656b511133a9961d0c73f0178ec4041..0a2cb9dccbbcf814bd4091faa1d2fb10f2a288e8 100644
--- a/Source/core/dom/Attr.cpp
+++ b/Source/core/dom/Attr.cpp
@@ -143,7 +143,9 @@ void Attr::setValue(const AtomicString& value, ExceptionState&)
void Attr::setNodeValue(const String& v)
{
- setValue(v, IGNORE_EXCEPTION);
+ // Attr uses AtomicString type for its value to save memory as there
+ // is duplication among Elements' attributes values.
+ setValue(AtomicString(v), IGNORE_EXCEPTION);
}
PassRefPtr<Node> Attr::cloneNode(bool /*deep*/)
« no previous file with comments | « no previous file | Source/core/dom/ClassNodeList.h » ('j') | Source/core/dom/NamedFlowCollection.cpp » ('J')

Powered by Google App Engine
This is Rietveld 408576698