Bug 17984

Summary: [Gtk] [Qt] Reproductible assertion failure ASSERT(document) in FrameLoader::saveDocumentState()
Product: WebKit Reporter: Julien Chaffraix <jchaffraix>
Component: WebKitGTKAssignee: Nobody <webkit-unassigned>
Status: RESOLVED DUPLICATE    
Severity: Normal Keywords: Gtk, NeedsReduction, Qt
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: All   
OS: Linux   
URL: http://tc.labs.opera.com/apis/XMLHttpRequest/open/001.html

Description Julien Chaffraix 2008-03-21 11:01:54 PDT
Step to reproduce :
1) Open a random URL
2) Open the test case URL
3) Go back to the previous URL

You should see :
ASSERTION FAILED: document
(/home/WebKit-Git/WebKit/WebCore/loader/FrameLoader.cpp:3990 void WebCore::FrameLoader::saveDocumentState())

The assertion is triggered on both Qt and Gtk port.
Comment 1 Julien Chaffraix 2008-03-21 11:16:03 PDT
I tracked down the issue to FrameLoaderClient::detachedFromParent4().

In both cases, we are setting m_frame to zero (and calling g_object_unref on gtk) which is not done in the Mac port (removing that part does remove the assertion failure in both cases).
The commit logs suggest that it is to prevent memory leaks so I could not determine if the platform is wrong or the assertion :
http://trac.webkit.org/projects/webkit/changeset/19046
http://trac.webkit.org/projects/webkit/changeset/30226
Comment 2 Jasper Bryant-Greene 2008-03-27 04:14:22 PDT
This is a dupe of 18064. I'm 99% certain that the assert is wrong, for reasons specified in that bug.
Comment 3 Julien Chaffraix 2008-03-29 19:26:08 PDT
Marking as duplicate as there is a patch on the other bug.

*** This bug has been marked as a duplicate of 18064 ***