Commit 090f7388 authored by jberlin@webkit.org's avatar jberlin@webkit.org

Crash calling disconnectFrame on a DOMWindowExtension a second time.

https://bugs.webkit.org/show_bug.cgi?id=85301

Reviewed by Darin Adler.

DOMWindowExtension::disconnectFrame assumed it would only be called when there was a frame
to disconnect. However, DOMWindow's destructor invokes disconnectFrame on all its
DOMWindowProperties, even if it already did so when it entered the page cache.

* page/DOMWindowExtension.cpp:
(WebCore::DOMWindowExtension::disconnectFrame):
Don't do anything if the frame has already been disconnected.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@115746 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent a2de6000
2012-05-01 Jessie Berlin <jberlin@apple.com>
Crash calling disconnectFrame on a DOMWindowExtension a second time.
https://bugs.webkit.org/show_bug.cgi?id=85301
Reviewed by Darin Adler.
DOMWindowExtension::disconnectFrame assumed it would only be called when there was a frame
to disconnect. However, DOMWindow's destructor invokes disconnectFrame on all its
DOMWindowProperties, even if it already did so when it entered the page cache.
* page/DOMWindowExtension.cpp:
(WebCore::DOMWindowExtension::disconnectFrame):
Don't do anything if the frame has already been disconnected.
2012-05-01 Aaron Colwell <acolwell@chromium.org>
Temporarily remove webkitSourceAddId() & webkitSourceRemoveId() from DOM
......@@ -54,6 +54,13 @@ DOMWindowExtension::~DOMWindowExtension()
void DOMWindowExtension::disconnectFrame()
{
// The DOMWindow destructor calls disconnectFrame on all its DOMWindowProperties, even if it
// did that already when entering the page cache.
if (m_disconnectedFrame) {
ASSERT(!frame());
return;
}
// Calling out to the client might result in this DOMWindowExtension being destroyed
// while there is still work to do.
RefPtr<DOMWindowExtension> protector = this;
......
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