Closed
Bug 300533
Opened 20 years ago
Closed 20 years ago
Viewmanager asserts on subframe history navigation with fastback/bfcache
Categories
(Core :: DOM: Navigation, defect)
Tracking
()
RESOLVED
FIXED
mozilla1.8beta4
People
(Reporter: bzbarsky, Assigned: bryner)
References
()
Details
(Keywords: fixed1.8)
Attachments
(1 file, 1 obsolete file)
|
2.35 KB,
patch
|
Biesinger
:
review+
brendan
:
approval1.8b4+
|
Details | Diff | Splinter Review |
BUILD: Current firefox trunk build
STEPS TO REPRODUCE:
1) Load testcase
2) Click link in iframe
3) Click back button
EXPECTED RESULTS: Go back, no asserts, everything good
ACTUAL RESULTS:
###!!! ASSERTION: tried to insert view with invalid sibling: 'sibling == nsnull
|| sibling->GetParent() == parent', file
../../../mozilla/view/src/nsViewManager.cpp, line 2639
and then the iframe background paints black instead of the color it should be
(user's default color).
Updated•20 years ago
|
Summary: Viemanager asserts on subframe history navigation with fastback/bfcache → Viewmanager asserts on subframe history navigation with fastback/bfcache
| Reporter | ||
Comment 1•20 years ago
|
||
OK, so I'm a little confused as to what's going on here. I broke in
nsDocShell::RestorePresentation, stepped down to where we get the old root view,
and looked at what we have:
(gdb) p oldRootView
$27 = (nsIView *) 0x8a84408
(gdb) p ((nsView*)oldRootView)->mParent
$29 = (nsView *) 0x89c0eb0
(gdb) p ((nsView*)oldRootView)->mParent->mFirstChild
$30 = (nsView *) 0x8a84408
(gdb) p ((nsView*)oldRootView)->mParent->mFirstChild->mNextSibling
$31 = (nsView *) 0x88a3110
(gdb) p ((nsView*)oldRootView)->mParent->mFirstChild->mNextSibling->mNextSibling
$32 = (nsView *) 0x0
(gdb) p rootViewSibling
$33 = (nsIView *) 0x88a3110
So far so good. Then I stepped down to where we get the new root view, and at
that point we have:
(gdb) p ((nsView*)rootViewParent)->mFirstChild
$34 = (nsView *) 0x8a84408
(gdb) p ((nsView*)rootViewParent)->mFirstChild->mNextSibling
$35 = (nsView *) 0x0
Note that for some reason oldRootView is still a child of rootViewParent. It's
the _other_ child (the one that was the next sibling) that got removed for some
reason... And indeed, rootViewSibling is dead by this point:
(gdb) p *(nsView*)rootViewSibling
$36 = {<nsIView> = {_vptr.nsIView = 0x1, mViewManager = 0xb7ffe6e0, mParent = 0x5,
mWindow = 0x4, mNextSibling = 0x84b21b8, mFirstChild = 0x1c00, mClientData =
0x1,
mZIndex = 0, mVis = nsViewVisibility_kHide, mPosX = 137199356, mPosY =
144700800,
mDimBounds = {x = 0, y = 0, width = 0, height = 0}, mOpacity = 0, mVFlags = 0},
mZParent = 0x0, mClipRect = 0x0, mDirtyRegion = 0x0, mChildRemoved = 0 '\0'}
Assignee: nobody → roc
Severity: normal → major
Component: History: Session → Layout: View Rendering
Flags: blocking1.8b4?
QA Contact: history.session → ian
Summary: Viewmanager asserts on subframe history navigation with fastback/bfcache → Viemanager asserts on subframe history navigation with fastback/bfcache
| Reporter | ||
Comment 2•20 years ago
|
||
I did a bit more testing and I think the key problem is this: in
RestorePresentation we have
(gdb) p oldPresShell.mRawPtr
$52 = (nsIPresShell *) 0x8a849d0
while if I break in PresShell::Destroy and see which presshell is destroyed when
we hide the old viewer, that gives me
Breakpoint 6, PresShell::Destroy (this=0x8a2b188)
Not the same presshell...
| Reporter | ||
Comment 3•20 years ago
|
||
OK, I suspect at least part of the problem is that for a data: URI
LoadHistoryEntry nixes the current content viewer by calling
CreateAboutBlankContentViewer().... I'll attach a testcase that shows the same
issue without data: URIs, though.
| Reporter | ||
Comment 4•20 years ago
|
||
| Reporter | ||
Comment 5•20 years ago
|
||
Comment on attachment 189118 [details]
Testcase
Actually, this testcase asserts in a different place. I'll file a new bug on
it...
Attachment #189118 -
Attachment is obsolete: true
| Reporter | ||
Comment 6•20 years ago
|
||
OK, so the non-data:/etc issue is bug 300538. And it looks like I forgot to put
the testcase in the URL field....
Assignee: roc → adamlock
Component: Layout: View Rendering → Embedding: Docshell
QA Contact: ian → adamlock
| Assignee | ||
Comment 7•20 years ago
|
||
Seems like something we need to fix before shipping.
Assignee: adamlock → bryner
Target Milestone: --- → mozilla1.8beta4
Updated•20 years ago
|
Flags: blocking1.8b4? → blocking1.8b4+
Summary: Viemanager asserts on subframe history navigation with fastback/bfcache → Viewmanager asserts on subframe history navigation with fastback/bfcache
| Assignee | ||
Comment 8•20 years ago
|
||
Did some debugging. The problem seems to be that the rootViewSibling that we
end up using belongs to the content viewer we're about to destroy. Normally
it would be the next view in the parent view hierarchy and would be unaffected
by the view manager swap. The reason it's different here is that rootView
belongs to the transient about:blank viewer -- the blank viewer and the real
old content viewer are both in the view tree. Might be able to solve this by
forcing the old content viewer to release its previousViewer before we start
shuffling things around.
| Assignee | ||
Comment 9•20 years ago
|
||
- If we create an about:blank viewer to use between loads, then nuke mOSHE so
that we don't ever associate that content viewer with the previous page
- Destroy mContentViewer's previousViewer before grabbing the root view
sibling, as described above
Attachment #192619 -
Flags: review?(cbiesinger)
Updated•20 years ago
|
Attachment #192619 -
Flags: review?(cbiesinger) → review+
| Assignee | ||
Comment 10•20 years ago
|
||
Comment on attachment 192619 [details] [diff] [review]
patch
requesting approval... since it's not really clear from the summary, the user
impact here is potential display problems and potential memory corruption when
using fastback with data: urls.
Attachment #192619 -
Flags: approval1.8b4?
Comment 11•20 years ago
|
||
Comment on attachment 192619 [details] [diff] [review]
patch
This about:blank transient business should go away with the right fix to bug
293363 -- please comment something about that with an XXX or FIXME.
/be
Attachment #192619 -
Flags: approval1.8b4? → approval1.8b4+
| Assignee | ||
Comment 12•20 years ago
|
||
I don't actually think this is that specific to the transient about:blank
viewer... in any case where mContentViewer has a previousViewer, we want to get
rid of it before capturing the root view sibling.
| Assignee | ||
Comment 13•20 years ago
|
||
fixed on trunk and branch
| Reporter | ||
Comment 14•20 years ago
|
||
This caused bug 306580
You need to log in
before you can comment on or make changes to this bug.
Description
•