Bug 1448505 - ProxyAccessible::RelationByType fails to return early, r=jamie a=lizzard
authorAlexander Surkov <surkov.alexander@gmail.com>
Wed, 30 Jan 2019 10:06:30 -0500
changeset 515691 e3fb31ea4d4bd8bff9a69d19461185ee6bcab9f6
parent 515690 b0ffd7b7d7ed7761aff58ef2dee4355380e305ce
child 515692 c5a3a2a563c90e116ec873aaee027164cb22ef97
push id1953
push userffxbld-merge
push dateMon, 11 Mar 2019 12:10:20 +0000
treeherdermozilla-release@9c35dcbaa899 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjamie, lizzard
bugs1448505
milestone66.0
Bug 1448505 - ProxyAccessible::RelationByType fails to return early, r=jamie a=lizzard
accessible/ipc/win/ProxyAccessible.cpp
--- a/accessible/ipc/win/ProxyAccessible.cpp
+++ b/accessible/ipc/win/ProxyAccessible.cpp
@@ -347,37 +347,37 @@ void ProxyAccessible::Attributes(nsTArra
   ConvertBSTRAttributesToArray(
       nsDependentString((wchar_t*)attrs, attrsWrap.length()), aAttrs);
 }
 
 nsTArray<ProxyAccessible*> ProxyAccessible::RelationByType(
     RelationType aType) const {
   RefPtr<IAccessible2_2> acc = QueryInterface<IAccessible2_2>(this);
   if (!acc) {
-    nsTArray<ProxyAccessible*>();
+    return nsTArray<ProxyAccessible*>();
   }
 
   _bstr_t relationType;
   for (uint32_t idx = 0; idx < ArrayLength(sRelationTypePairs); idx++) {
     if (aType == sRelationTypePairs[idx].first) {
       relationType = sRelationTypePairs[idx].second;
       break;
     }
   }
 
   if (!relationType) {
-    nsTArray<ProxyAccessible*>();
+    return nsTArray<ProxyAccessible*>();
   }
 
   IUnknown** targets;
   long nTargets = 0;
   HRESULT hr =
       acc->get_relationTargetsOfType(relationType, 0, &targets, &nTargets);
   if (FAILED(hr)) {
-    nsTArray<ProxyAccessible*>();
+    return nsTArray<ProxyAccessible*>();
   }
 
   nsTArray<ProxyAccessible*> proxies;
   for (long idx = 0; idx < nTargets; idx++) {
     IUnknown* target = targets[idx];
     proxies.AppendElement(GetProxyFor(Document(), target));
     target->Release();
   }