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

Unified Diff: Source/core/html/HTMLEmbedElement.cpp

Issue 177613003: Consistently cache ElementData::length() before loops (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Fix test failure Created 6 years, 10 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
« no previous file with comments | « Source/core/dom/Node.cpp ('k') | Source/core/html/HTMLObjectElement.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/html/HTMLEmbedElement.cpp
diff --git a/Source/core/html/HTMLEmbedElement.cpp b/Source/core/html/HTMLEmbedElement.cpp
index 10dcf7aa2006f28e1c492cecb2e27b3d6412d348..25855fb0a047adee1865d78a2d110503bd1e4952 100644
--- a/Source/core/html/HTMLEmbedElement.cpp
+++ b/Source/core/html/HTMLEmbedElement.cpp
@@ -115,7 +115,8 @@ void HTMLEmbedElement::parametersForPlugin(Vector<String>& paramNames, Vector<St
if (!hasAttributes())
return;
- for (unsigned i = 0; i < attributeCount(); ++i) {
+ unsigned attributeCount = this->attributeCount();
+ for (unsigned i = 0; i < attributeCount; ++i) {
const Attribute* attribute = attributeItem(i);
paramNames.append(attribute->localName().string());
paramValues.append(attribute->value().string());
« no previous file with comments | « Source/core/dom/Node.cpp ('k') | Source/core/html/HTMLObjectElement.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698