Closed
Bug 707862
Opened 13 years ago
Closed 13 years ago
Reset childCount on SHEntry when all children have been removed
Categories
(Core :: DOM: Navigation, defect)
Core
DOM: Navigation
Tracking
()
RESOLVED
FIXED
mozilla13
People
(Reporter: ttaubert, Assigned: ttaubert)
Details
Attachments
(1 file)
3.47 KB,
patch
|
smaug
:
review+
|
Details | Diff | Splinter Review |
Follow-up from bug 705597 comment #43:
Removing children from a SHEntry creates holes. After all children have been removed the .childCount property should be reset to zero. Otherwise it indicates there are SHEntry children but will return null for every GetChildAt() call.
Assignee | ||
Comment 1•13 years ago
|
||
I realized that we could go even further and always remove empty children when they're at the end of the mChildren array - that's what this patch does.
Regarding the test, I didn't know where a test like this should go and if there are any SHistory mochitests? I for now chose the sessionstore component because the test is almost identical to the one from bug 705597 (only slightly adapted).
Comment 2•13 years ago
|
||
There are quite a few tests in docshell/test
Assignee | ||
Comment 3•13 years ago
|
||
Oops, I looked for them in docshell/shistory/... Will move the test.
Comment 4•13 years ago
|
||
I'm trying to remember if we can cleanup mChildren, especially if there are some
non-dynamically added children and some dynamically added.
Comment 5•13 years ago
|
||
How often does the situation actually happen?
Assignee | ||
Comment 6•13 years ago
|
||
I have no idea how often that happens in the wild. It seems to happen but maybe not really often or only with some sites. In fact, since bug 705597 landed it doesn't affect session store anymore so if you're not sure about the consequences of resetting childCount I'm fine with not doing it. Just wanted to try fixing 'the real issue' instead of just the symptom :)
Comment 7•13 years ago
|
||
Comment on attachment 580643 [details] [diff] [review]
patch v1
Please land this very early in FF13 cycle. Session history changes
are very regression risky. If this causes regressions, please
back out asap.
Attachment #580643 -
Flags: review?(bugs) → review+
Comment 8•13 years ago
|
||
Comment on attachment 580643 [details] [diff] [review]
patch v1
And use --i, not i--
Assignee | ||
Comment 9•13 years ago
|
||
(In reply to Olli Pettay [:smaug] from comment #8)
> And use --i, not i--
Fixed.
https://hg.mozilla.org/integration/fx-team/rev/d8b2e5047c9b
Whiteboard: [fixed-in-fx-team]
Target Milestone: --- → mozilla13
Assignee | ||
Comment 10•13 years ago
|
||
Status: ASSIGNED → RESOLVED
Closed: 13 years ago
Resolution: --- → FIXED
Whiteboard: [fixed-in-fx-team]
You need to log in
before you can comment on or make changes to this bug.
Description
•