Changeset 23552 in webkit


Ignore:
Timestamp:
Jun 15, 2007 2:17:47 PM (17 years ago)
Author:
andersca
Message:

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]):
Location:
trunk/WebKit
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/WebKit/ChangeLog

    r23535 r23552  
     12007-06-15  Anders Carlsson  <andersca@apple.com>
     2
     3        Reviewed by Kevin.
     4
     5        <rdar://problem/5271774> REGRESSION: A crash occurs when closing a window that contains a QT movie
     6       
     7        In some cases, calling [super dealloc] might end up calling visibleRect, so make sure to
     8        set _element to 0 so we won't send a message to a freed object and crash.
     9       
     10        * Plugins/WebKitPluginContainerView.mm:
     11        (-[WebKitPluginContainerView dealloc]):
     12        (-[WebKitPluginContainerView visibleRect]):
     13
    1142007-06-14  Anders Carlsson  <andersca@apple.com>
    215
  • trunk/WebKit/Plugins/WebKitPluginContainerView.mm

    r22084 r23552  
    4545{
    4646    [_element release];
     47   
     48    // Calling [super dealloc] can end up calling visibleRect so we need to set
     49    // the _element instance to 0 here so we can check for it in our visibleRect.
     50    _element = 0;
     51   
    4752    [super dealloc];
    4853}
     
    5055- (NSRect)visibleRect
    5156{
     57    if (!_element)
     58        return [super visibleRect];
     59   
    5260    // WebCore may impose an additional clip (via CSS overflow or clip properties).  Fetch
    5361    // that clip now.   
Note: See TracChangeset for help on using the changeset viewer.