From 0e01d47b9760b74bc1a5c93c93a39ffc46d3c4f4 Mon Sep 17 00:00:00 2001 From: Trevor Saunders Date: Tue, 21 Jul 2015 11:21:53 -0400 Subject: [PATCH] bug 1185726 - avoid killing the child process when it sends the parent events with bad IDs r=lsocks --- accessible/ipc/DocAccessibleParent.cpp | 24 +++++++++++++++--------- 1 file changed, 15 insertions(+), 9 deletions(-) diff --git a/accessible/ipc/DocAccessibleParent.cpp b/accessible/ipc/DocAccessibleParent.cpp index f5270565e0f..e16b521a70d 100644 --- a/accessible/ipc/DocAccessibleParent.cpp +++ b/accessible/ipc/DocAccessibleParent.cpp @@ -30,13 +30,13 @@ DocAccessibleParent::RecvShowEvent(const ShowEventData& aData) // required show events. if (!parent) { NS_ERROR("adding child to unknown accessible"); - return false; + return true; } uint32_t newChildIdx = aData.Idx(); if (newChildIdx > parent->ChildrenCount()) { NS_ERROR("invalid index to add child at"); - return false; + return true; } uint32_t consumed = AddSubtree(parent, aData.NewTree(), 0, newChildIdx); @@ -48,7 +48,7 @@ DocAccessibleParent::RecvShowEvent(const ShowEventData& aData) } #endif - return consumed != 0; + return true; } uint32_t @@ -140,8 +140,10 @@ DocAccessibleParent::RecvStateChangeEvent(const uint64_t& aID, const bool& aEnabled) { ProxyAccessible* target = GetAccessible(aID); - if (!target) - return false; + if (!target) { + NS_ERROR("we don't know about the target of a state change event!"); + return true; + } ProxyStateChangeEvent(target, aState, aEnabled); return true; @@ -151,8 +153,10 @@ bool DocAccessibleParent::RecvCaretMoveEvent(const uint64_t& aID, const int32_t& aOffset) { ProxyAccessible* proxy = GetAccessible(aID); - if (!proxy) - return false; + if (!proxy) { + NS_ERROR("unknown caret move event target!"); + return true; + } ProxyCaretMoveEvent(proxy, aOffset); return true; @@ -167,8 +171,10 @@ DocAccessibleParent::RecvTextChangeEvent(const uint64_t& aID, const bool& aFromUser) { ProxyAccessible* target = GetAccessible(aID); - if (!target) - return false; + if (!target) { + NS_ERROR("text change event target is unknown!"); + return true; + } ProxyTextChangeEvent(target, aStr, aStart, aLen, aIsInsert, aFromUser);