bug 1162543 - IDs not mapping to accessibles shouldn't cause ipc calls to fail r=davidb
authorTrevor Saunders <tbsaunde@tbsaunde.org>
Thu, 07 May 2015 10:26:01 -0400
changeset 242810 4127a3c0300b4f84e2efabeb1e2431fe530f6dca
parent 242809 b34c538f36804b7030a32404e67c859d52340a9d
child 242811 a74ede09893fc7cb4a6fa1dbbac0c758595aa3bb
push id59517
push usertrev.saunders@gmail.com
push dateThu, 07 May 2015 18:09:13 +0000
treeherdermozilla-inbound@4127a3c0300b [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersdavidb
bugs1162543
milestone40.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 1162543 - IDs not mapping to accessibles shouldn't cause ipc calls to fail r=davidb This is expected to happen when a accessible in the child process is shutdown, but the parent calls a method with its ID before learning it has been shut down.
accessible/ipc/DocAccessibleChild.cpp
--- a/accessible/ipc/DocAccessibleChild.cpp
+++ b/accessible/ipc/DocAccessibleChild.cpp
@@ -219,17 +219,17 @@ DocAccessibleChild::PersistentProperties
 
 bool
 DocAccessibleChild::RecvRelationByType(const uint64_t& aID,
                                        const uint32_t& aType,
                                        nsTArray<uint64_t>* aTargets)
 {
   Accessible* acc = mDoc->GetAccessibleByUniqueID((void*)aID);
   if (!acc)
-    return false;
+    return true;
 
   auto type = static_cast<RelationType>(aType);
   Relation rel = acc->RelationByType(type);
   while (Accessible* target = rel.Next())
     aTargets->AppendElement(reinterpret_cast<uintptr_t>(target));
 
   return true;
 }
@@ -251,18 +251,18 @@ AddRelation(Accessible* aAcc, RelationTy
   }
 }
 
 bool
 DocAccessibleChild::RecvRelations(const uint64_t& aID,
                                   nsTArray<RelationTargets>* aRelations)
 {
   Accessible* acc = mDoc->GetAccessibleByUniqueID((void*)aID);
-  if (!aID)
-    return false;
+  if (!acc)
+    return true;
 
 #define RELATIONTYPE(gecko, s, a, m, i) AddRelation(acc, RelationType::gecko, aRelations);
 
 #include "RelationTypeMap.h"
 #undef RELATIONTYPE
 
   return true;
 }