Bug 1487103: Remove useless .catch(). r=trivial
authorKris Maglione <maglione.k@gmail.com>
Wed, 29 Aug 2018 10:15:37 -0700
changeset 482192 af99701b058f487afa740d47431ceb290b3cf3eb
parent 482191 a6e752d996557df8cd1782c52751edde538bb9ab
child 482219 69846c690825abcf57a3304a183996e87dc23119
push id232
push userfmarier@mozilla.com
push dateWed, 05 Sep 2018 20:45:54 +0000
reviewerstrivial
bugs1487103
milestone63.0a1
Bug 1487103: Remove useless .catch(). r=trivial
toolkit/components/extensions/parent/ext-runtime.js
--- a/toolkit/components/extensions/parent/ext-runtime.js
+++ b/toolkit/components/extensions/parent/ext-runtime.js
@@ -84,19 +84,17 @@ this.runtime = class extends ExtensionAP
             AddonManager.addUpgradeListener(instanceID, upgrade => {
               extension.upgrade = upgrade;
               let details = {
                 version: upgrade.version,
               };
               fire.sync(details);
             });
             return () => {
-              AddonManager.removeUpgradeListener(instanceID).catch(e => {
-                // This can happen if we try this after shutdown is complete.
-              });
+              AddonManager.removeUpgradeListener(instanceID);
             };
           },
         }).api(),
 
         reload: async () => {
           if (extension.upgrade) {
             // If there is a pending update, install it now.
             extension.upgrade.install();