Bug 1110486 - Use .then instead of .catch to handle rejections in Tooltip.isValidHoverTarget as Markup View uses deprecated-sync-thenables; r=pbrosset
authorSami Jaktholm <sjakthol@outlook.com>
Fri, 12 Dec 2014 09:29:57 +0100
changeset 219480 4714d60fe7ed62cd9f464ff70ba7b06a0807d594
parent 219353 8fdd13f5dba9155c1763ecb1943c9bfd51337177
child 219481 bc169301ff47fd74e5fa06d6d45aab15b87062ce
push idunknown
push userunknown
push dateunknown
reviewerspbrosset
bugs1110486
milestone37.0a1
Bug 1110486 - Use .then instead of .catch to handle rejections in Tooltip.isValidHoverTarget as Markup View uses deprecated-sync-thenables; r=pbrosset
browser/devtools/shared/widgets/Tooltip.js
--- 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:");