-
ggaren authored
Reviewed by Maciej Stachowiak. - Fixed loader crash by clarifying ownership of WebKit client objects. WebCore objects own their WebKit clients, and ref and deref through virtual methods, leaving WebKit free to use whatever client / reference-counting implementation it likes. * WebCore.exp: * WebCore.xcodeproj/project.pbxproj: * bridge/EditorClient.h: Fixed up function prototypes for style. * loader/FrameLoader.cpp: Removed detachFrameLoader, since its real purpose was to implement an alternative ownership model. (WebCore::FrameLoader::~FrameLoader): Removed empty destructor. (WebCore::FrameLoader::setClient): This function now takes ownership (WebCore::FrameLoader::client): * loader/FrameLoader.h: * loader/FrameLoaderClient.h: * page/ChromeClient.h: * platform/AbstractShared.h: Added. This is the virtual function-based refcounting complement to Shared. (WebCore::AbstractShared::~AbstractShared): WebKit: Reviewed by Maciej Stachowiak. - Fixed loader crash by clarifying ownership of WebKit client objects. WebCore objects own their WebKit clients, and ref and deref through virtual methods, leaving WebKit free to use whatever client / reference-counting implementation it likes. WebKit on Mac just uses the same refcounting class that WebCore uses (Shared), but other platforms may choose to do other things. * WebCoreSupport/WebChromeClient.h: (WebChromeClient::ref): (WebChromeClient::deref): (WebChromeClient::refCount): * WebCoreSupport/WebEditorClient.h: Nixed commented-out function prototypes. The ones in WebCore make clear what remains to be implemented. Replaced constructor with factory function to avoid leaks. * WebCoreSupport/WebEditorClient.mm: (WebEditorClient::create): (WebEditorClient::WebEditorClient): (WebEditorClient::setWebFrame): * WebCoreSupport/WebFrameBridge.mm: (-[WebFrameBridge initMainFrameWithPage:WebCore::frameName:view:webView:]): (-[WebFrameBridge initSubframeWithOwnerElement:frameName:view:]): * WebCoreSupport/WebFrameLoaderClient.h: Replaced constructor with factory function to avoid leaks. (WebFrameLoaderClient::ref): (WebFrameLoaderClient::deref): (WebFrameLoaderClient::refCount): * WebCoreSupport/WebFrameLoaderClient.mm: (WebFrameLoaderClient::create): * WebView/WebFrame.mm: (-[WebFrame _initWithWebFrameView:webView:coreFrame:]): git-svn-id: http://svn.webkit.org/repository/webkit/trunk@17740 268f45cc-cd09-0410-ab3c-d52691b4dbfc
58e230ca