Skip to content

Conversation

muffinresearch
Copy link
Contributor

@muffinresearch muffinresearch commented May 12, 2016

getAddon() {
// Resolves a promise with the addon.
// This will be falsey if the addon wasn't found.
return this.mozAddonManager.getAddonByID(this.id);
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe we should have this just reject if the addon is falsey?

@coveralls
Copy link

Coverage Status

Coverage remained the same at 100.0% when pulling 8dcdab5 on muffinresearch:add-lib-for-addonManager into b789e18 on mozilla:master.

@coveralls
Copy link

Coverage Status

Coverage remained the same at 100.0% when pulling d03ae23 on muffinresearch:add-lib-for-addonManager into b789e18 on mozilla:master.

}
// If uninstallation succeeded return the original
// promise.
return addonUninstall;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This will return a promise that yields true, then? Shouldn't this just return, which would be a promise that resolves with no arguments?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah I guess that covers both now and the future cases equally.

@mstriemer
Copy link
Contributor

r+wc

@muffinresearch muffinresearch merged commit 2640956 into mozilla:master May 12, 2016
@muffinresearch muffinresearch deleted the add-lib-for-addonManager branch May 12, 2016 18:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Create a small library for the browser API interface
3 participants