Bug 44441

Summary: WebPDFView should remove itself as the delegate of its PDFView before being dealloced
Product: WebKit Reporter: Mike Thole <mthole>
Component: PDFAssignee: Mike Thole <mthole>
Status: RESOLVED FIXED    
Severity: Normal    
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Macintosh   
OS: OS X 10.6   
Attachments:
Description Flags
Proposed patch mitz: review+

Description Mike Thole 2010-08-23 11:03:52 PDT
WebKit should nil out the PDFView's delegate before releasing it.  This is required to fix <rdar://problem/6978204> in PDFKit.
Comment 1 Mike Thole 2010-08-23 11:06:05 PDT
Created attachment 65141 [details]
Proposed patch
Comment 2 mitz 2010-08-23 11:19:55 PDT
Comment on attachment 65141 [details]
Proposed patch

> Index: WebKit/mac/ChangeLog
> ===================================================================
> --- WebKit/mac/ChangeLog	(revision 65818)
> +++ WebKit/mac/ChangeLog	(working copy)
> @@ -1,3 +1,13 @@
> +2010-08-23  Mike Thole  <mthole@apple.com>
> +
> +        Reviewed by NOBODY (OOPS!).
> +
> +        WebKit should nil out PDFView's delegate before releasing it

The change is good, but the description isn’t totally accurate. The problem is that the WebPDFView is deallocated while it is still the delegate, not that the PDFView is being released while having a non-nil delegate.
Comment 3 Mike Thole 2010-08-23 11:27:58 PDT
Good point Dan.  I've updated the title to more accurately reflect the actual problem: "WebPDFView should remove itself as the delegate of its PDFView before being dealloced"
Comment 4 Mike Thole 2010-08-23 11:29:03 PDT
Committed revision 65820.