Closed
Bug 296275
Opened 19 years ago
Closed 19 years ago
forward button history throws error
Categories
(Firefox :: Toolbars and Customization, defect)
Firefox
Toolbars and Customization
Tracking
()
RESOLVED
FIXED
Firefox1.5
People
(Reporter: Peter6, Assigned: tabmix.onemen)
Details
(Keywords: regression)
Attachments
(1 file, 2 obsolete files)
2.47 KB,
patch
|
mconnor
:
review+
asa
:
approval-aviary1.1a2+
|
Details | Diff | Splinter Review |
Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.8b2) Gecko/20050601
Firefox/1.0+ ID:2005060113
repro:
1.click any link on this page
2.press menu back button
3.press menu forward button
Error: uncaught exception: [Exception... "Component returned failure code:
0x80004005 (NS_ERROR_FAILURE) [nsISHistory.getEntryAtIndex]" nsresult:
"0x80004005 (NS_ERROR_FAILURE)" location: "JS frame ::
chrome://browser/content/browser.js :: FillHistoryMenu :: line 2457" data: no]
regression bug 285647
fix:
case "forward":
end = ((count-index) > MAX_HISTORY_MENU_ITEMS) ? index +
MAX_HISTORY_MENU_ITEMS : count-1;
if ((index + 1) > end) return false;
for (j = index + 1; j <= end; j++)
{
entry = sessionHistory.getEntryAtIndex(j, false);
if (entry)
createMenuItem(aParent, j, entry.title);
}
break;
credits: onemen@walla.com
Assignee | ||
Comment 2•19 years ago
|
||
Comment 3•19 years ago
|
||
Comment on attachment 185065 [details] [diff] [review]
fix uncaught exception in the case end == count
This regresses bug 285647, so it's not acceptable.
Attachment #185065 -
Attachment is obsolete: true
Attachment #185065 -
Flags: review-
bug 296305 is for suite.
Assignee | ||
Comment 5•19 years ago
|
||
(In reply to comment #3)
> (From update of attachment 185065 [details] [diff] [review] [edit])
> This regresses bug 285647, so it's not acceptable.
>
no no no
it does not regresses bug 285647, i can still count from 1.... to 15. :)
Comment 6•19 years ago
|
||
I've tested it, and it does regress the bug. Are you sure you're testing
correctly? Visit more than fifteen pages, so that the back menu has more than 15
entries, then use the back button to go back to the first page you visited. You
then see only 14 entries in the forward button dropdown.
Component: History → Toolbars
OS: Windows 2000 → All
QA Contact: history → toolbars
Hardware: PC → All
Assignee | ||
Comment 7•19 years ago
|
||
(In reply to comment #6)
> I've tested it, and it does regress the bug. Are you sure you're testing
> correctly? Visit more than fifteen pages, so that the back menu has more than 15
> entries, then use the back button to go back to the first page you visited. You
> then see only 14 entries in the forward button dropdown.
i'm very sure. can you check again.....
Assignee | ||
Updated•19 years ago
|
Attachment #185065 -
Attachment is obsolete: false
Comment 8•19 years ago
|
||
Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8b2) Gecko/20050607
Firefox/1.0+
Using the steps in comment 0, I see the error message in the JavaScript console,
but clicking an item in the forward menu works anyway.
Updated•19 years ago
|
Flags: blocking1.8b4?
Flags: blocking1.8b3?
Flags: blocking1.8b3-
(In reply to comment #6)
> I've tested it, and it does regress the bug. Are you sure you're testing
> correctly? Visit more than fifteen pages, so that the back menu has more than 15
> entries, then use the back button to go back to the first page you visited. You
> then see only 14 entries in the forward button dropdown.
It does not regress the bug, I've tested it and it makes perfect sense!
Comment 10•19 years ago
|
||
(In reply to comment #9)
Let me explain :)
Basically, in the case of having less than 16 items in the history |end| is
being assigned to |count|, and the for loop uses j <= end, which is invalid
because count is one past the last item in the session history.
So by returning count - 1 (once again, this is only for the case of having less
than 16 items) will give us a proper |end| which points to the last item in the
history.
Comment 11•19 years ago
|
||
Sorry, this does appear to work. I must have made a mistake in testing it
earlier. Here's the same patch, but unbitrotted.
Attachment #185065 -
Attachment is obsolete: true
Attachment #187996 -
Flags: review?(mconnor)
Comment 12•19 years ago
|
||
Urgh, forgot the help portion. Sorry for the spam.
Attachment #187996 -
Attachment is obsolete: true
Attachment #187997 -
Flags: review?(mconnor)
Updated•19 years ago
|
Attachment #187996 -
Flags: review?(mconnor)
Updated•19 years ago
|
Attachment #185065 -
Flags: review-
Updated•19 years ago
|
Assignee: nobody → onemen
Updated•19 years ago
|
Attachment #187997 -
Flags: review?(mconnor) → review+
Comment 13•19 years ago
|
||
Comment on attachment 187997 [details] [diff] [review]
Fix help and browser
Requesting approval for a small/safe patch that deals with an uncaught
exception.
Attachment #187997 -
Flags: approval-aviary1.1a2?
Updated•19 years ago
|
Attachment #187997 -
Flags: approval-aviary1.1a2? → approval-aviary1.1a2+
Updated•19 years ago
|
Whiteboard: [checkin needed]
Comment 14•19 years ago
|
||
Checking in toolkit/components/help/content/help.js;
/cvsroot/mozilla/toolkit/components/help/content/help.js,v <-- help.js
new revision: 1.33; previous revision: 1.32
done
Checking in browser/base/content/browser.js;
/cvsroot/mozilla/browser/base/content/browser.js,v <-- browser.js
new revision: 1.453; previous revision: 1.452
done
Assignee: onemen → gavin.sharp
Whiteboard: [checkin needed]
Target Milestone: --- → Firefox1.1
Updated•19 years ago
|
Status: NEW → RESOLVED
Closed: 19 years ago
Flags: blocking1.8b4?
Flags: blocking1.8b3-
Resolution: --- → FIXED
Comment 15•19 years ago
|
||
Reopening to reassign. onemen@walla.com fixed this, not me :).
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
Updated•19 years ago
|
Assignee: gavin.sharp → onemen
Status: REOPENED → NEW
Updated•19 years ago
|
Status: NEW → RESOLVED
Closed: 19 years ago → 19 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•