Bug 1531584 - catch promise error when updating a11y menu item when DOMWalker connection is already closed. r=gl
Differential Revision: https://phabricator.services.mozilla.com/D23321
This commit is contained in:
@@ -757,8 +757,10 @@ class MarkupContextMenu {
|
||||
}
|
||||
|
||||
async _updateA11YMenuItem(menuItem) {
|
||||
const hasMethod = await this.target.actorHasMethod("domwalker",
|
||||
"hasAccessibilityProperties");
|
||||
const hasMethod = await this.target.actorHasMethod(
|
||||
"domwalker", "hasAccessibilityProperties").catch(
|
||||
// Connection to DOMWalker might have been already closed.
|
||||
error => console.warn(error));
|
||||
if (!hasMethod) {
|
||||
return;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user