Closed Bug 864745 Opened 13 years ago Closed 12 years ago

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

Categories

(Add-on SDK Graveyard :: General, defect, P3)

defect

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: Irving, Assigned: jsantell)

References

Details

Attachments

(1 file)

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.
Blocks: 850303
Assignee: nobody → jsantell
No longer blocks: 850303
Blocks: 850303
Attached file bug
Attachment #800119 - Flags: review?(zer0)
Attachment #800119 - Flags: review?(zer0) → review+
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
Status: NEW → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: