Skip to content

Commit 2fa8cf9

Browse files
author
agoloman
committed
Revert "Bug 1996506 - Don't climb above document in GetNonGenericParent. r=Jamie" for causing mass failures.
This reverts commit ec0aa56.
1 parent 9d8e068 commit 2fa8cf9

File tree

2 files changed

+3
-9
lines changed

2 files changed

+3
-9
lines changed

accessible/basetypes/Accessible.h

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -705,12 +705,11 @@ class Accessible {
705705
}
706706

707707
/**
708-
* Returns the nearest ancestor in the document which is not a generic
709-
* element.
708+
* Returns the nearest ancestor which is not a generic element.
710709
*/
711710
Accessible* GetNonGenericParent() const {
712711
for (Accessible* parent = Parent(); parent; parent = parent->Parent()) {
713-
if (parent->IsDoc() || !parent->IsGeneric()) {
712+
if (!parent->IsGeneric()) {
714713
return parent;
715714
}
716715
}

accessible/ipc/DocAccessibleParent.h

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -233,12 +233,7 @@ class DocAccessibleParent : public RemoteAccessible,
233233
// Accessible
234234
virtual Accessible* Parent() const override {
235235
if (IsTopLevel()) {
236-
if (NS_IsMainThread()) {
237-
return OuterDocOfRemoteBrowser();
238-
} else {
239-
MOZ_ASSERT_UNREACHABLE("Getting local parent off main thread!");
240-
return nullptr;
241-
}
236+
return OuterDocOfRemoteBrowser();
242237
}
243238
return RemoteParent();
244239
}

0 commit comments

Comments
 (0)