Commit 760b2e8f authored by mjs's avatar mjs

Reviewed by Dave.

	- fixed 3148141 - crash in KJS::WindowFunc::tryCall leaving certain site

        * kwq/KWQKHTMLPart.mm:
        (KWQKHTMLPart::setView): If setting the view to nil and we have a
	document, detach the document. This means that we are removing a
	frame from the tree, so we want to run it's onUnload handler now,
	rather than later when things are no longer fully hooked up.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@3345 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent 77a985bc
2003-01-16 Maciej Stachowiak <mjs@apple.com>
Reviewed by Dave.
- fixed 3148141 - crash in KJS::WindowFunc::tryCall leaving certain site
* kwq/KWQKHTMLPart.mm:
(KWQKHTMLPart::setView): If setting the view to nil and we have a
document, detach the document. This means that we are removing a
frame from the tree, so we want to run it's onUnload handler now,
rather than later when things are no longer fully hooked up.
2003-01-16 Richard Williamson <rjw@apple.com>
Fixed 3148932. Account for zero width characters
......
2003-01-16 Maciej Stachowiak <mjs@apple.com>
Reviewed by Dave.
- fixed 3148141 - crash in KJS::WindowFunc::tryCall leaving certain site
* kwq/KWQKHTMLPart.mm:
(KWQKHTMLPart::setView): If setting the view to nil and we have a
document, detach the document. This means that we are removing a
frame from the tree, so we want to run it's onUnload handler now,
rather than later when things are no longer fully hooked up.
2003-01-16 Richard Williamson <rjw@apple.com>
Fixed 3148932. Account for zero width characters
......
......@@ -279,6 +279,13 @@ ReadOnlyPart *KWQKHTMLPart::createPart(const ChildFrame &child, const KURL &url,
void KWQKHTMLPart::setView(KHTMLView *view, bool weOwnIt)
{
// Detach the document now, so any onUnload handlers get run - if
// we wait until the view is destroyed, then things won't be
// hooked up enough for some JavaScript calls to work.
if (d->m_doc && view == NULL) {
d->m_doc->detach();
}
if (_ownsView) {
if (!(d->m_doc && d->m_doc->inPageCache()))
delete d->m_view;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment