Closed
Bug 292950
Opened 20 years ago
Closed 19 years ago
Assert on reload
Categories
(Core :: DOM: Navigation, defect)
Tracking
()
RESOLVED
FIXED
People
(Reporter: bzbarsky, Assigned: sicking)
References
Details
Attachments
(1 file)
(deleted),
patch
|
bryner
:
review-
bryner
:
superreview-
|
Details | Diff | Splinter Review |
STEPS TO REPRODUCE:
1) Build and enable bfcache
2) Start browser
3) Load http://www.mozilla.org/
4) Wait for load to finish
5) Click "reload" button
EXPECTED RESULTS: reload quietly
ACTUAL RESULTS:
###!!! ASSERTION: RestorePresentation should only be called for history loads:
'mLoadType & LOAD_CMD_HISTORY', file
/home/bzbarsky/mozilla/vanilla/mozilla/docshell/base/nsDocShell.cpp, line 4952
Reporter | ||
Updated•20 years ago
|
Blocks: blazinglyfastback
Reporter | ||
Comment 1•20 years ago
|
||
OK, this is actually happening with bfcache disabled too. Could we get some
traction on this? Why are we ending up inside RestorePresentation() for
non-history loads, exactly?
Summary: Assert on reload when fastback/bfcache is enabled → Assert on reload
Reporter | ||
Comment 2•20 years ago
|
||
To be precise, this is happening for loads with mType == LOAD_RELOAD_NORMAL.
Those have a SHEntry, but are not exactly history loads in the sense we want
here. That is, I don't think we should be doing fastback-like stuff for
LOAD_RELOAD_NORMAL.
We should probably just change this assert to a check-and-early-return, even
before we look at the history entry.
Comment 3•19 years ago
|
||
be good if we could resolve in firefox 1.1. see
https://bugzilla.mozilla.org/show_bug.cgi?id=295813
Flags: blocking1.8b3+
Assignee | ||
Comment 4•19 years ago
|
||
Don't restore saved presentation unless there is one
Attachment #185894 -
Flags: superreview?(bryner)
Attachment #185894 -
Flags: review?(bryner)
Reporter | ||
Comment 5•19 years ago
|
||
Doesn't this skip saving the current presentation too? That looks wrong...
Comment 7•19 years ago
|
||
Comment on attachment 185894 [details] [diff] [review]
patch to fix
Seems better to just check at the call site whether (mLoadType &
LOAD_CMD_HISTORY)? That's the assumption of RestorePresentation, not that the
viewer is non-null.
Attachment #185894 -
Flags: superreview?(bryner)
Attachment #185894 -
Flags: superreview-
Attachment #185894 -
Flags: review?(bryner)
Attachment #185894 -
Flags: review-
Assignee | ||
Comment 8•19 years ago
|
||
The reason i checked the viewer was that otherwise we'd end up calling
SyncPresentationState on both SHEntries. That seemed like unneccesary work?
Also, it seemed like a good sanity check to assert if we have a viewer but
aren't performing a history load. Though that could be added separatly.
Comment 9•19 years ago
|
||
Maybe we could only do the SyncPresentationState work for the case where
NS_FAILED(rv)? The only cases where |restored| is false, but the method
succeeds are:
1. no saved presentation
2. the saved content viewer has a different container
In the first case here, there's no need to SyncPresentation, but in the second
case, since we null out the saved content viewer, we probably do want to
SyncPresentation. So maybe we do this:
1. Change case #2 above to return a failure code
2. Make the SyncPresentation work only happen if NS_FAILED(rv).
3. Wrap the whole thing with a check of mLoadType
Assignee | ||
Updated•19 years ago
|
Assignee: bryner → bugmail
Comment 10•19 years ago
|
||
fixed by bug 292954 checkin
Status: NEW → RESOLVED
Closed: 19 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•