Closed
Bug 391899
Opened 17 years ago
Closed 17 years ago
getItemForID returns an empty nsIUpdateItem if the item doesn't exist
Categories
(Toolkit :: Add-ons Manager, defect)
Toolkit
Add-ons Manager
Tracking
()
RESOLVED
FIXED
mozilla1.9alpha8
People
(Reporter: mossop, Assigned: mossop)
Details
Attachments
(1 file)
(deleted),
patch
|
robert.strong.bugs
:
review+
|
Details | Diff | Splinter Review |
I think the API would make more sense for getItemForID to return null in the event you request an item that isn't installed. I don't see anywhere that relies on having this empty item. Thoughts Rob?
Comment 1•17 years ago
|
||
Agreed though I swear there were some places that depended on it.
Assignee | ||
Comment 2•17 years ago
|
||
I've been through every call I could find and only on in fuel looked like it needed an amendment and for the better as well.
This just checks if the id is in the known list and bails out of not. Includes a simple unit test to check the behaviour.
Assignee: nobody → dtownsend
Status: NEW → ASSIGNED
Attachment #276510 -
Flags: review?(robert.bugzilla)
Assignee | ||
Comment 3•17 years ago
|
||
Rob, I've done some testing with this patch applied and not come across any issues as yet.
Comment 4•17 years ago
|
||
Comment on attachment 276510 [details] [diff] [review]
patch rev 1
Dave, I vaguely recall there being a call site that depended on this returning an item when it wasn't in the datasource but for the life of me I can't find it. I've looked through the call sites and I don't see any that do so perhaps this was fixed at some point. Let's keep an eye on this especially incompatible installs that are then made compatible by their update rdf. r=me
Attachment #276510 -
Flags: review?(robert.bugzilla) → review+
Assignee | ||
Comment 5•17 years ago
|
||
RCS file: /cvsroot/mozilla/toolkit/mozapps/extensions/test/unit/test_bug391899.js,v
done
Checking in toolkit/mozapps/extensions/test/unit/test_bug391899.js;
/cvsroot/mozilla/toolkit/mozapps/extensions/test/unit/test_bug391899.js,v <-- test_bug391899.js
initial revision: 1.1
done
Checking in toolkit/mozapps/extensions/src/nsExtensionManager.js.in;
/cvsroot/mozilla/toolkit/mozapps/extensions/src/nsExtensionManager.js.in,v <-- nsExtensionManager.js.in
new revision: 1.240; previous revision: 1.239
done
Checking in toolkit/mozapps/extensions/public/nsIExtensionManager.idl;
/cvsroot/mozilla/toolkit/mozapps/extensions/public/nsIExtensionManager.idl,v <-- nsIExtensionManager.idl
new revision: 1.51; previous revision: 1.50
done
Checking in browser/fuel/src/fuelApplication.js;
/cvsroot/mozilla/browser/fuel/src/fuelApplication.js,v <-- fuelApplication.js
new revision: 1.19; previous revision: 1.18
done
Status: ASSIGNED → RESOLVED
Closed: 17 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 3 M8
Updated•16 years ago
|
Product: Firefox → Toolkit
You need to log in
before you can comment on or make changes to this bug.
Description
•