Closed
Bug 304357
Opened 21 years ago
Closed 21 years ago
InstallTrigger status callbacks always report failure (-210: user cancelled)
Categories
(Toolkit :: Add-ons Manager, defect)
Toolkit
Add-ons Manager
Tracking
()
RESOLVED
FIXED
People
(Reporter: dveditz, Assigned: robert.strong.bugs)
References
Details
(Keywords: regression)
Attachments
(1 file, 2 obsolete files)
|
7.01 KB,
patch
|
mconnor
:
approval1.8b4+
|
Details | Diff | Splinter Review |
The checkin for bug 296566 changed the extension manager to first cancel an
existing nsXPInstallManager and then create a new one. Web pages that have a
trigger callback function to help direct users in case of error are now broken,
as they will now always get the USER_CANCELLED (-210) return code.
I know sites use this because I got a raft of complaints about the error code
returned when we added install site whitelisting.
Killing the install manager and starting a new one has also complicated my
attempt to add install hashes (bug 302284), though since we may also want them
for updates (which call InitManagerFromChrome) that's not why this bug should be
fixed.
| Reporter | ||
Updated•21 years ago
|
Flags: blocking1.8b4?
Summary: InstallTrigger status callbacks always report -210 → InstallTrigger status callbacks always report failure (-210: user cancelled)
| Assignee | ||
Comment 1•21 years ago
|
||
I tested updates and InstallTrigger installs from a web page successfully but
this needs more testing before review. Daniel, can you try it out?
| Assignee | ||
Comment 2•21 years ago
|
||
For clarity, updates initiated by the EM are still handled using
InitManagerFromChrome and installs from a web page are handled in the manner
before the patch for bug 296566 landed. In regards to update I don't think this
is a problem for bug 302284 since there is no method to add a hash - at least
not yet.
| Reporter | ||
Comment 3•21 years ago
|
||
heh, that's very nearly identical to the patch I just finished testing. I forgot
to update the uuid though, so I'll go with yours.
| Reporter | ||
Comment 4•21 years ago
|
||
Here's steps to repro:
1: go to https://addons.mozilla.org (or other whitelisted site)
2: in the location bar enter the following
javascript:InstallTrigger.install({'foo':'http://www.mozilla.org/foo.xpi'},function(u,s){alert(u+'\n'+s);});void(0)
3: click "InstallNow" button
Expected result: status -207 (download error, bogus .xpi)
Actual result: status -210 (install cancelled)
Or you could use a valid package url in which case the expected status would be 0.
| Assignee | ||
Comment 5•21 years ago
|
||
Comment on attachment 192425 [details] [diff] [review]
patch
Thanks Daniel
Attachment #192425 -
Flags: review?(benjamin)
| Assignee | ||
Updated•21 years ago
|
Assignee: bugs → rob_strong
| Assignee | ||
Comment 6•21 years ago
|
||
Comment on attachment 192425 [details] [diff] [review]
patch
Forgot to update the comment in the interface.
Attachment #192425 -
Attachment is obsolete: true
Attachment #192425 -
Flags: review?(benjamin)
| Assignee | ||
Comment 7•21 years ago
|
||
Attachment #192432 -
Flags: review?(benjamin)
| Reporter | ||
Comment 8•21 years ago
|
||
Comment on attachment 192425 [details] [diff] [review]
patch
sr=dveditz
Seeking r= from ben
Should copy the @param comment in the .idl file
Attachment #192425 -
Flags: superreview+
Attachment #192425 -
Flags: review?(bugs)
| Reporter | ||
Comment 9•21 years ago
|
||
Comment on attachment 192432 [details] [diff] [review]
patch w/ commented interface
sr=dveditz
Attachment #192432 -
Flags: superreview+
Comment 10•21 years ago
|
||
Comment on attachment 192425 [details] [diff] [review]
patch
>+ if (fromChrome) {
>+ // Cancel the existing xpimgr...
>+ gOS.notifyObservers(txn, "xpinstall-progress", "cancel");
Is this necessary anymore now that we're not trying to cancel the web page
xpimgr?
r=ben@mozilla.org
Attachment #192425 -
Flags: review?(bugs) → review+
| Assignee | ||
Comment 11•21 years ago
|
||
Ben is correct... the xpinstall cancel is no longer needed.
Attachment #192432 -
Attachment is obsolete: true
Attachment #192449 -
Flags: review?(benjamin)
| Assignee | ||
Updated•21 years ago
|
Attachment #192432 -
Flags: review?(benjamin)
| Assignee | ||
Comment 12•21 years ago
|
||
Benjamin - this has ben gave this an r+ and dveditz gave this an sr+. Can I get
an a+ from you when you review it?
Updated•21 years ago
|
Attachment #192449 -
Flags: review?(benjamin) → approval1.8b4+
| Assignee | ||
Comment 13•21 years ago
|
||
Carried over Ben's r+ and dveditz's sr+
Fixed for 1.8b4
Status: NEW → RESOLVED
Closed: 21 years ago
Resolution: --- → FIXED
| Assignee | ||
Updated•21 years ago
|
Flags: blocking1.8b4?
Updated•18 years ago
|
Product: Firefox → Toolkit
You need to log in
before you can comment on or make changes to this bug.
Description
•