| Index: Source/core/dom/Node.cpp
|
| diff --git a/Source/core/dom/Node.cpp b/Source/core/dom/Node.cpp
|
| index 63dd1935cc7dc1452b07f22e7becee1113658d3c..08bea08b9483b1b31c7fb1e6ef4416a85294c805 100644
|
| --- a/Source/core/dom/Node.cpp
|
| +++ b/Source/core/dom/Node.cpp
|
| @@ -1341,7 +1341,8 @@ bool Node::isDefaultNamespace(const AtomicString& namespaceURIMaybeEmpty) const
|
| return elem->namespaceURI() == namespaceURI;
|
|
|
| if (elem->hasAttributes()) {
|
| - for (unsigned i = 0; i < elem->attributeCount(); i++) {
|
| + unsigned attributeCount = elem->attributeCount();
|
| + for (unsigned i = 0; i < attributeCount; ++i) {
|
| const Attribute* attr = elem->attributeItem(i);
|
|
|
| if (attr->localName() == xmlnsAtom)
|
| @@ -1426,7 +1427,8 @@ const AtomicString& Node::lookupNamespaceURI(const String& prefix) const
|
| return elem->namespaceURI();
|
|
|
| if (elem->hasAttributes()) {
|
| - for (unsigned i = 0; i < elem->attributeCount(); i++) {
|
| + unsigned attributeCount = elem->attributeCount();
|
| + for (unsigned i = 0; i < attributeCount; ++i) {
|
| const Attribute* attr = elem->attributeItem(i);
|
|
|
| if (attr->prefix() == xmlnsAtom && attr->localName() == prefix) {
|
|
|