зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1024910 - DevTools: Catch and ignore expected rejections from Tooltip.isValidHoverTarget; r=pbrosset
This commit is contained in:
Родитель
1e1fec944d
Коммит
e482c290fa
|
@ -415,6 +415,16 @@ Tooltip.prototype = {
|
|||
setNamedTimeout(this.uid, this._showDelay, () => {
|
||||
this.isValidHoverTarget(event.target).then(target => {
|
||||
this.show(target);
|
||||
}).catch((reason) => {
|
||||
if (reason === false) {
|
||||
// isValidHoverTarget rejects with false if the tooltip should
|
||||
// not be shown. This can be safely ignored.
|
||||
return;
|
||||
}
|
||||
// Report everything else. Reason might be error that should not be
|
||||
// hidden.
|
||||
console.error("isValidHoverTarget rejected with an unexpected reason:");
|
||||
console.error(reason);
|
||||
});
|
||||
});
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче