Closed Bug 1173418 Opened 8 years ago Closed 8 years ago

DocAccessibleParent::Destroy shouldn't call RemoteDocShutdown on non-top level document


(Core :: Disability Access APIs, defect)

Not set



Tracking Status
firefox41 --- fixed


(Reporter: lsocks, Assigned: lsocks)



(1 file, 2 obsolete files)

When a DocAccessible has Unbind called on it, it no longer has a parent document. If Destroy is called at some point after, it will think it's a top level document and erroneously call RemoteDocShutdown.
Summary: DocAccessible::Destroy shouldn't call RemoteDocShutdown on non-top level document → DocAccessibleParent::Destroy shouldn't call RemoteDocShutdown on non-top level document
Comment on attachment 8620418 [details] [diff] [review]
add field to indicate if a DocAccessibleParent is a top level doc, check when Destroy is called

># HG changeset patch
># User Lorien Hu <>
># Date 1433956020 14400
>#      Wed Jun 10 13:07:00 2015 -0400
># Node ID 1ad52bb738487378c8ed166db74fa7c9da6396b7
># Parent  517791f65cd95dcb8cf3d9fee022d7b1109201b3
>Bug 1173418 - Add top-level field to DocAccessibleParent and check on destruction

how about something like

the bug title and then some more explanation?

>+  mTopLevel = true;

might as well inline it

>   DocAccessibleParent() :
>-    ProxyAccessible(this), mParentDoc(nullptr), mShutdown(false)
>+    ProxyAccessible(this), mParentDoc(nullptr), mTopLevel(false), mShutdown(false)

over 80 chars

>+  void SetTopLevel();
>+  bool IsTopLevel() { return mTopLevel; };

make it const?
Attachment #8620418 - Flags: review?(tbsaunde+mozbugs) → review+
Comment on attachment 8620437 [details] [diff] [review]
Check if a document is top level in DocAccessibleParent::Destroy so that RemoteDocShutdown isn't erroneously called

>+  inline void SetTopLevel() { mTopLevel = true; }
>+  inline bool IsTopLevel() const { return mTopLevel; }

inline is implicit for methods defined within the class.
Attachment #8620437 - Flags: review?(tbsaunde+mozbugs) → review+
Closed: 8 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla41
You need to log in before you can comment on or make changes to this bug.