Bug 1172577 - Handle proxies in mozAccessible method customDescription r=tbsaunde
authorLorien Hu <lorien@lorienhu.com>
Mon, 08 Jun 2015 14:12:03 -0400
changeset 248394 7792819983848a6c82e9cbb322c0b763cb635c64
parent 248393 810ffc2e869f7adab50499c4eea2a61b7e92336b
child 248395 42c0f3d737f1227011127701f10282836bea48cf
push id28893
push userkwierso@gmail.com
push dateFri, 12 Jun 2015 00:02:58 +0000
treeherdermozilla-central@8cf9d3e497f9 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerstbsaunde
bugs1172577
milestone41.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1172577 - Handle proxies in mozAccessible method customDescription r=tbsaunde
accessible/mac/mozAccessible.mm
--- a/accessible/mac/mozAccessible.mm
+++ b/accessible/mac/mozAccessible.mm
@@ -595,23 +595,24 @@ struct RoleDescrComparator
 {
   // Do nothing. mozTextAccessible will.
 }
 
 - (NSString*)customDescription
 {
   NS_OBJC_BEGIN_TRY_ABORT_BLOCK_NIL;
 
-  AccessibleWrap* accWrap = [self getGeckoAccessible];
-  if (accWrap->IsDefunct())
+  nsAutoString desc;
+  if (AccessibleWrap* accWrap = [self getGeckoAccessible])
+    accWrap->Description(desc);
+  else if (ProxyAccessible* proxy = [self getProxyAccessible])
+    proxy->Description(desc);
+  else
     return nil;
 
-  nsAutoString desc;
-  accWrap->Description(desc);
-
   return nsCocoaUtils::ToNSString(desc);
 
   NS_OBJC_END_TRY_ABORT_BLOCK_NIL;
 }
 
 - (NSString*)help
 {
   NS_OBJC_BEGIN_TRY_ABORT_BLOCK_NIL;