| Index: Source/core/page/PageSerializer.cpp
|
| diff --git a/Source/core/page/PageSerializer.cpp b/Source/core/page/PageSerializer.cpp
|
| index 7f31c9c055639726f0477a0e03fa69a8af25ee07..e72a2af99ea944244db5d36f836a176ca23678b5 100644
|
| --- a/Source/core/page/PageSerializer.cpp
|
| +++ b/Source/core/page/PageSerializer.cpp
|
| @@ -78,7 +78,8 @@ static bool isCharsetSpecifyingNode(const Node& node)
|
| return false;
|
| HTMLAttributeList attributes;
|
| if (element.hasAttributes()) {
|
| - for (unsigned i = 0; i < element.attributeCount(); ++i) {
|
| + unsigned attributeCount = element.attributeCount();
|
| + for (unsigned i = 0; i < attributeCount; ++i) {
|
| const Attribute* attribute = element.attributeItem(i);
|
| // FIXME: We should deal appropriately with the attribute if they have a namespace.
|
| attributes.append(std::make_pair(attribute->name().localName(), attribute->value().string()));
|
|
|