Nit: you could use arrow function here as well:
``js
AddonManager.getAddonByID(id, addon => addon ? resolve(addon) : reject());
```