Closed
Bug 599509
Opened 14 years ago
Closed 14 years ago
Canceling add-on install from a listener triggers an exception
Categories
(Toolkit :: Add-ons Manager, defect)
Tracking
()
VERIFIED
FIXED
mozilla2.0b7
Tracking | Status | |
---|---|---|
blocking2.0 | --- | - |
People
(Reporter: Mardak, Assigned: mossop)
References
Details
Attachments
(1 file)
5.45 KB,
patch
|
robert.strong.bugs
:
review+
|
Details | Diff | Splinter Review |
Error: [Exception... "'Error: Cannot start installing from this state' when calling method: [mozIStorageStatementCallback::handleCompletion]" nsresult: "0x8057001c (NS_ERROR_XPC_JS_THREW_JS_OBJECT)" location: "<unknown>" data: no]
sample code:
AddonManager.getInstallForURL(url, function(addon) {
addon.addListener({
onDownloadEnded: function() {
addon.cancel();
}
});
addon.install();
}, "application/x-xpiinstall");
If I return false from onDownloadEnded, there's no exception.
Assignee | ||
Comment 1•14 years ago
|
||
We should be checking that self.state is still STATE_DOWNLOADED before proceeding with the install in here: http://mxr.mozilla.org/mozilla-central/source/toolkit/mozapps/extensions/XPIProvider.jsm#4786.
I don't think this blocks as there is an easy solution, but I'd review and approve a patch with a test.
blocking2.0: --- → -
Assignee | ||
Comment 2•14 years ago
|
||
A little extra protection to stop us ending up in odd states, just check that we're still in the state we expect to be in after calling out to listeners that can change the state.
Assignee: nobody → dtownsend
Status: NEW → ASSIGNED
Attachment #479839 -
Flags: review?(robert.bugzilla)
Assignee | ||
Updated•14 years ago
|
Whiteboard: [has patch][needs review rs]
Updated•14 years ago
|
Attachment #479839 -
Flags: review?(robert.bugzilla) → review+
Updated•14 years ago
|
Whiteboard: [has patch][needs review rs] → [has patch]
Assignee | ||
Comment 3•14 years ago
|
||
Status: ASSIGNED → RESOLVED
Closed: 14 years ago
Flags: in-testsuite+
Flags: in-litmus-
Resolution: --- → FIXED
Whiteboard: [has patch]
Target Milestone: --- → mozilla2.0b8
Comment 4•14 years ago
|
||
Kinda hard to test this manually. I will have to trust the automated test. No regressions filed so far. Means I assume its fixed now.
Status: RESOLVED → VERIFIED
Updated•14 years ago
|
Target Milestone: mozilla2.0b8 → mozilla2.0b7
You need to log in
before you can comment on or make changes to this bug.
Description
•