Bug 1288590: Use GetAttrInfoAt in sdnAccessible.cpp. r=bholley
authorEmilio Cobos Álvarez <ecoal95@gmail.com>
Thu, 21 Jul 2016 20:12:00 -0700
changeset 332004 541dcf32848224ffa9d8b87f76e11e9483d09ff0
parent 332003 bc6fb539da99b972e3a9755ca8e5bbf5d06db14f
child 332005 ab031c62a9353b61459e002a16d43c2a815882c6
push id9858
push userjlund@mozilla.com
push dateMon, 01 Aug 2016 14:37:10 +0000
treeherdermozilla-aurora@203106ef6cb6 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbholley
bugs1288590
milestone50.0a1
Bug 1288590: Use GetAttrInfoAt in sdnAccessible.cpp. r=bholley MozReview-Commit-ID: LQrtUwssnQN
accessible/windows/sdn/sdnAccessible.cpp
--- a/accessible/windows/sdn/sdnAccessible.cpp
+++ b/accessible/windows/sdn/sdnAccessible.cpp
@@ -144,20 +144,21 @@ sdnAccessible::get_attributes(unsigned  
 
   *aNumAttribs = static_cast<unsigned short>(numAttribs);
 
   for (uint32_t index = 0; index < numAttribs; index++) {
     aNameSpaceIDs[index] = 0;
     aAttribValues[index] = aAttribNames[index] = nullptr;
     nsAutoString attributeValue;
 
-    const nsAttrName* name = elm->GetAttrNameAt(index);
-    aNameSpaceIDs[index] = static_cast<short>(name->NamespaceID());
-    aAttribNames[index] = ::SysAllocString(name->LocalName()->GetUTF16String());
-    elm->GetAttr(name->NamespaceID(), name->LocalName(), attributeValue);
+    nsAttrInfo attr = elm->GetAttrInfoAt(index);
+    attr.mValue->ToString(attributeValue);
+
+    aNameSpaceIDs[index] = static_cast<short>(attr.mName->NamespaceID());
+    aAttribNames[index] = ::SysAllocString(attr.mName->LocalName()->GetUTF16String());
     aAttribValues[index] = ::SysAllocString(attributeValue.get());
   }
 
   return S_OK;
 
   A11Y_TRYBLOCK_END
 }