addon/installer doesn't handle "addon not found" responses from AddonManager.getAddonByID()

RESOLVED FIXED

Status

Add-on SDK
General
P3
normal
RESOLVED FIXED
5 years ago
4 years ago

People

(Reporter: Irving, Assigned: jsantell)

Tracking

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

At http://dxr.mozilla.org/mozilla-central/addon-sdk/source/lib/sdk/addon/installer.js#l90 and http://dxr.mozilla.org/mozilla-central/addon-sdk/source/lib/sdk/addon/installer.js#l101, AddonManager.getAddonByID() may call back with null to represent "addon not found". The existing callback functions don't check the parameter, so they will throw JS errors in this case. We probably want to reject the promise with an informative message instead.

Updated

5 years ago
Priority: -- → P3
(Assignee)

Updated

4 years ago
Blocks: 850303
(Assignee)

Updated

4 years ago
Assignee: nobody → jsantell
No longer blocks: 850303
(Assignee)

Updated

4 years ago
Blocks: 850303
Created attachment 800119 [details]
bug
Attachment #800119 - Flags: review?(zer0)
Attachment #800119 - Flags: review?(zer0) → review+

Comment 2

4 years ago
Commits pushed to master at https://github.com/mozilla/addon-sdk

https://github.com/mozilla/addon-sdk/commit/e150a1feb2773e8e9992b998ad842e26c002a946
Bug 864745 Reject promise when invalid IDs given to disable, uninstall in addon installer

https://github.com/mozilla/addon-sdk/commit/e833700bd74a487fcbfd111933a4f39977cfa5ad
Merge pull request #1232 from jsantell/864745-addon-installer-graceful

fix Bug 864745 Reject promise when invalid IDs given to disable, uninstall, r=@ZER0

Updated

4 years ago
Status: NEW → RESOLVED
Last Resolved: 4 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.