Commit 97ead476 authored by sullivan@apple.com's avatar sullivan@apple.com

Reviewed by Tim Hatcher

        
        - speculative fix for <rdar://problem/5509989> CrashTracer: [USER] 1 crash in Safari at com.apple.WebKit: 
        -[WebPDFView(FileInternal) _updatePreferencesSoon] + 56
        
        The crash is probably due to messaging a dealloc'ed dataSource ivar. The dataSource ivar isn't retained
        by this class, but should be. (It is retained by WebHTMLView, e.g.).

        * WebView/WebPDFView.mm:
        (-[WebPDFView dealloc]):
        release dataSource ivar
        (-[WebPDFView setDataSource:]):
        retain dataSource ivar



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@27718 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent 788c299c
2007-11-12 John Sullivan <sullivan@apple.com>
Reviewed by Tim Hatcher
- speculative fix for <rdar://problem/5509989> CrashTracer: [USER] 1 crash in Safari at com.apple.WebKit:
-[WebPDFView(FileInternal) _updatePreferencesSoon] + 56
The crash is probably due to messaging a dealloc'ed dataSource ivar. The dataSource ivar isn't retained
by this class, but should be. (It is retained by WebHTMLView, e.g.).
* WebView/WebPDFView.mm:
(-[WebPDFView dealloc]):
release dataSource ivar
(-[WebPDFView setDataSource:]):
retain dataSource ivar
2007-11-09 Tristan O'Tierney <tristan@apple.com>
Reviewed by Timothy Hatcher.
......
......@@ -183,6 +183,7 @@ static BOOL _PDFSelectionsAreEqual(PDFSelection *selectionA, PDFSelection *selec
- (void)dealloc
{
ASSERT(!trackedFirstResponder);
[dataSource release];
[previewView release];
[PDFSubview release];
[path release];
......@@ -528,7 +529,13 @@ static BOOL _PDFSelectionsAreEqual(PDFSelection *selectionA, PDFSelection *selec
- (void)setDataSource:(WebDataSource *)ds
{
dataSource = ds;
if (dataSource == ds)
return;
dataSource = [ds retain];
// FIXME: There must be some better place to put this. There is no comment in ChangeLog
// explaining why it's in this method.
[self setFrame:[[self superview] frame]];
}
......
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