UNCONFIRMED 26665
webView:didFailLoadWithError:forFrame: called in -[WebView close]
https://bugs.webkit.org/show_bug.cgi?id=26665
Summary webView:didFailLoadWithError:forFrame: called in -[WebView close]
Jeff Johnson
Reported 2009-06-23 17:00:46 PDT
Overview Description: According to the documentation for -[WebView close], "A closed web view no longer responds to new requests nor sends delegate messages." However, if I call -[WebView close] while a page is still loading, it triggers the callback webView:didFailLoadWithError:forFrame: with NSURLErrorCancelled. Steps to Reproduce: 1) Unzip, build, and run attached sample Xcode project "WebViewClose.zip" Actual Results: As you can see in the console log, webView:didFailLoadWithError:forFrame: is called after -[WebView close] is called. Expected Results: After -[WebView close] is called, there should be no delegate callbacks. Build Date & Platform: git commit 401f9b797d616c4f01bfe3f730b723494afc0ec2 Tue Jun 23 23:06:36 2009 +0000, corresponding to svn r45011. Build 2002-03-15 on Mac OS 9.0 Additional Builds and Platforms: This problem also occurs with stock WebKit on Mac OS X 10.5.7 with Safari 4.0.1 (5530.18). Additional Information: The sample project is based on the MiniBrowser example in "/Developer/Examples/WebKit" from the Xcode 3.1.3 install. I only made a few changes -- indicated by the NSLog() statements, to trigger the call to -[WebView close] during page loading. Depending on the definition of 'closed', a WebView may not be technically closed until -close returns. However, having -close trigger a delegate callback is not really good with respect to the method's documentation. At the very least, it needs to be documented when exactly you can expect delegate callbacks to stop.
Attachments
Sample Xcode project (21.24 KB, application/octet-stream)
2009-06-23 17:01 PDT, Jeff Johnson
no flags
Jeff Johnson
Comment 1 2009-06-23 17:01:43 PDT
Created attachment 31758 [details] Sample Xcode project
Jeff Johnson
Comment 2 2009-06-23 17:02:55 PDT
Ignore the line "Build 2002-03-15 on Mac OS 9.0". That was left over from copying and pasting text. :-)
Note You need to log in before you can comment on or make changes to this bug.