Bug 689105 - Ensure a11y children are initialized before caching on Mac. r=surkov, r=davidb
authorHub Figuiere <hfiguiere@mozilla.com>
Mon, 05 Dec 2011 12:33:30 -0800
changeset 81478 95e631d313a3721f7ffbd20bfb40f67338429b91
parent 81477 b30a2262608de91f296adfefd12cbfffb33cb785
child 81479 335a204bcfe942d59f70186a5e4b156b9116cfc2
push id3837
push usersurkov.alexander@gmail.com
push dateTue, 06 Dec 2011 06:08:31 +0000
treeherdermozilla-inbound@335a204bcfe9 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerssurkov, davidb
bugs689105
milestone11.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 689105 - Ensure a11y children are initialized before caching on Mac. r=surkov, r=davidb
accessible/src/mac/mozAccessible.mm
--- a/accessible/src/mac/mozAccessible.mm
+++ b/accessible/src/mac/mozAccessible.mm
@@ -386,19 +386,19 @@ GetNativeFromGeckoAccessible(nsIAccessib
 }
 
 // gets our native children lazily.
 // returns nil when there are no children.
 - (NSArray*)children
 {
   NS_OBJC_BEGIN_TRY_ABORT_BLOCK_NIL;
 
-  if (mChildren)
+  if (mChildren || !mGeckoAccessible->AreChildrenCached())
     return mChildren;
-    
+
   mChildren = [[NSMutableArray alloc] init];
   
   // get the array of children.
   nsTArray<nsRefPtr<nsAccessibleWrap> > childrenArray;
   mGeckoAccessible->GetUnignoredChildren(childrenArray);
   
   // now iterate through the children array, and get each native accessible.
   int totalCount = childrenArray.Length();