Bug 1110486 - Use .then instead of .catch to handle rejections in Tooltip.isValidHoverTarget as Markup View uses deprecated-sync-thenables; r=pbrosset
--- a/browser/devtools/shared/widgets/Tooltip.js
+++ b/browser/devtools/shared/widgets/Tooltip.js
@@ -410,17 +410,17 @@ Tooltip.prototype = {
_onBaseNodeMouseMove: function(event) {
if (event.target !== this._lastHovered) {
this.hide();
this._lastHovered = event.target;
setNamedTimeout(this.uid, this._showDelay, () => {
this.isValidHoverTarget(event.target).then(target => {
this.show(target);
- }).catch((reason) => {
+ }, 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:");