Closed
Bug 457777
Opened 17 years ago
Closed 16 years ago
bookmark items in distribution.ini are not added if the item number has more than one digit
Categories
(Firefox :: General, defect)
Firefox
General
Tracking
()
RESOLVED
FIXED
Firefox 3.7a1
People
(Reporter: kev, Assigned: kev)
Details
Attachments
(2 files, 1 obsolete file)
|
347 bytes,
text/plain
|
Details | |
|
416 bytes,
patch
|
mak
:
review+
beltzner
:
approval1.9.2.2+
beltzner
:
approval1.9.1.9+
|
Details | Diff | Splinter Review |
Bookmark items with an id number of two digits or more are ignored by the distribution.js module. Bookmark items with an id number of one digit are parsed and added properly. The issue applies to both bookmark toolbar entries and bookmark menu entries.
Attached is a sample distribution.ini file that contains three bookmark toolbar items, one with an item number of "1", one with an item number of "10", and one with an item number of "100". Only the bookmark with an item number of "1" is added to the toolbar.
| Assignee | ||
Comment 1•16 years ago
|
||
because Gavin is awesome, he pointed out to me today that there was a string vs. int comparison issue. editing line 157 of distribution.js such that it reads:
if (maxItemId < parseInt(iid))
seems to do the trick nicely.
thunder, could you have a look and verify that's all that needs to be done to the file?
Comment 2•16 years ago
|
||
Comment on attachment 425119 [details] [diff] [review]
Patch to ensure iid comparison is int to int
Holy cow, I'd forgotten about this bug. Indeed, interpreting those as strings would be trouble. I didn't realize that /(\d+)/ would end up giving me a string (boo).
I just skimmed distribution.js:
http://mxr.mozilla.org/mozilla-central/source/browser/components/distribution.js?force=1
And it looks like the only instance of this bug there.
r+ as far as I'm concerned
Attachment #425119 -
Flags: review+
| Assignee | ||
Comment 3•16 years ago
|
||
Excellent. Need this added to 1.9.1, 1.9.2, and Central. Who should be cc'd for review and landing?
Comment 4•16 years ago
|
||
(In reply to comment #3)
> Excellent. Need this added to 1.9.1, 1.9.2, and Central. Who should be cc'd for
> review and landing?
you already have review. i can land this on central, then you just need to ask approvals.
Assignee: nobody → kev
Status: NEW → ASSIGNED
| Assignee | ||
Comment 5•16 years ago
|
||
That'd be great, Marco. Thanks.
Comment 6•16 years ago
|
||
http://hg.mozilla.org/mozilla-central/rev/ff46fa92babd
once got a green you're clear to ask approval for branches.
Status: ASSIGNED → RESOLVED
Closed: 16 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 3.7a1
Comment 7•16 years ago
|
||
Thanks Marco!
Updated•16 years ago
|
Attachment #425119 -
Flags: approval1.9.2.2?
Attachment #425119 -
Flags: approval1.9.1.9?
Comment 8•16 years ago
|
||
Comment on attachment 425119 [details] [diff] [review]
Patch to ensure iid comparison is int to int
Hmm, actually, this patch isn't quite ideal, since iid is still being assigned to maxItemId as a string, so you're still relying on implicit conversion (just in the opposite direction - maxItemId to an int). Would be cleaner to just set iid = parseInt(iid) right after it's assigned to, I think.
Attachment #425119 -
Flags: approval1.9.2.2?
Attachment #425119 -
Flags: approval1.9.1.9?
| Assignee | ||
Comment 9•16 years ago
|
||
Per Gavin's comment #8, revised the patch to set iid = parseInt(iid) after assignment.
Attachment #425119 -
Attachment is obsolete: true
| Assignee | ||
Updated•16 years ago
|
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
| Assignee | ||
Comment 10•16 years ago
|
||
Marco, can you back out the old patch?
Comment 11•16 years ago
|
||
(In reply to comment #10)
> Marco, can you back out the old patch?
I'll undo the previous change once i push the new patch, in a single push.
Updated•16 years ago
|
Attachment #425437 -
Flags: review+
Comment 12•16 years ago
|
||
Updated•16 years ago
|
Status: REOPENED → RESOLVED
Closed: 16 years ago → 16 years ago
Resolution: --- → FIXED
| Assignee | ||
Comment 13•16 years ago
|
||
Asking for acceptance into 1.9.1.next and 1.9.2.next, as it addresses a long-standing bug with existing partner repacks that have more than 10 items in a bookmark folder as part of their customizations. Would also like to ensure this is included in any future releases.
Thanks!
blocking1.9.1: --- → ?
blocking1.9.2: --- → ?
Comment 14•16 years ago
|
||
Definitely wanted; if those patches are safe, can we get them nominated for the appropriate branches?
Comment 15•16 years ago
|
||
Comment on attachment 425437 [details] [diff] [review]
Revised update to address comment #8
Yes, the patch is safe enough, just a string->int cast.
Attachment #425437 -
Flags: approval1.9.2.2?
Attachment #425437 -
Flags: approval1.9.1.9?
Comment 16•16 years ago
|
||
Comment on attachment 425437 [details] [diff] [review]
Revised update to address comment #8
a=beltzner for 1.9.2 and 1.9.1
Attachment #425437 -
Flags: approval1.9.2.2?
Attachment #425437 -
Flags: approval1.9.2.2+
Attachment #425437 -
Flags: approval1.9.1.9?
Attachment #425437 -
Flags: approval1.9.1.9+
Updated•16 years ago
|
Keywords: checkin-needed
Whiteboard: [c-n: 191, 192]
Comment 17•16 years ago
|
||
Whiteboard: [c-n: 191, 192] → [c-n: 191]
Comment 18•16 years ago
|
||
Marco: can you check this into the branches?
Comment 19•16 years ago
|
||
You need to log in
before you can comment on or make changes to this bug.
Description
•