Commit 62cb03f9 authored by andersca's avatar andersca

Reviewed by Kevin.

        <rdar://problem/5271774> REGRESSION: A crash occurs when closing a window that contains a QT movie
        
        In some cases, calling [super dealloc] might end up calling visibleRect, so make sure to
        set _element to 0 so we won't send a message to a freed object and crash.
        
        * Plugins/WebKitPluginContainerView.mm:
        (-[WebKitPluginContainerView dealloc]):
        (-[WebKitPluginContainerView visibleRect]):



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@23552 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent 28e2c179
2007-06-15 Anders Carlsson <andersca@apple.com>
Reviewed by Kevin.
<rdar://problem/5271774> REGRESSION: A crash occurs when closing a window that contains a QT movie
In some cases, calling [super dealloc] might end up calling visibleRect, so make sure to
set _element to 0 so we won't send a message to a freed object and crash.
* Plugins/WebKitPluginContainerView.mm:
(-[WebKitPluginContainerView dealloc]):
(-[WebKitPluginContainerView visibleRect]):
2007-06-14 Anders Carlsson <andersca@apple.com>
Reviewed by Geoff.
......
......@@ -44,11 +44,19 @@
- (void)dealloc
{
[_element release];
// Calling [super dealloc] can end up calling visibleRect so we need to set
// the _element instance to 0 here so we can check for it in our visibleRect.
_element = 0;
[super dealloc];
}
- (NSRect)visibleRect
{
if (!_element)
return [super visibleRect];
// WebCore may impose an additional clip (via CSS overflow or clip properties). Fetch
// that clip now.
return NSIntersectionRect([self convertRect:[_element _windowClipRect] fromView:nil], [super visibleRect]);
......
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