Skip to content
  • thatcher's avatar
    WebCore: · a6df3ece
    thatcher authored
            Reviewed by Darin.
    
            <rdar://problem/3694163> -[KWQPageState finalize] is incorrect; design change needed
            <rdar://problem/3694165> -[WebCoreFrameBridge finalize] is incorrect; design change needed
    
            Added close methods that need to be called before these
            objects can be released. This ensures proper tear-down under GC.
    
            * WebCore.xcodeproj/project.pbxproj:
            * bridge/mac/WebCoreFrameBridge.h:
            * bridge/mac/WebCoreFrameBridge.mm:
            (-[WebCoreFrameBridge dealloc]):
            (-[WebCoreFrameBridge finalize]):
            (-[WebCoreFrameBridge close]):
            * bridge/mac/WebCorePageBridge.h:
            * bridge/mac/WebCorePageBridge.mm:
            (-[WebCorePageBridge setMainFrame:]):
            (-[WebCorePageBridge dealloc]):
            (-[WebCorePageBridge finalize]):
            (-[WebCorePageBridge close]):
            (-[WebCorePageBridge mainFrame]):
            (-[WebCorePageBridge setGroupName:]):
            (-[WebCorePageBridge groupName]):
            * kwq/KWQPageState.h:
            * kwq/KWQPageState.mm:
            (-[KWQPageState dealloc]):
            (-[KWQPageState finalize]):
            (-[KWQPageState close]):
    
    WebKit:
    
            Reviewed by Darin.
    
            <rdar://problem/4484405> WebKit leaks, improper tear-down
            <rdar://problem/3694059> -[WebBackForwardList finalize] is incorrect; design change needed
            <rdar://problem/3694103> -[WebFrame finalize] is incorrect; design change needed
            <rdar://problem/3694104> -[WebHTMLView finalize] is incorrect; design change needed
    
            Adds a close method to WebView, this needs to be called when the 
            WebView is no longer needed. To make this easier for the common cases
            there is now an "auto close" on WebView that listens to the view's
            parent window. If the parent window closes and the WebView has no
            hostWindow then the WebView is automatically closed if autoClose is YES.
            To manage WebView closing yourself call setAutoClose: and pass NO.
    
            When a WebView closes it will tear-down and not be usable anymore.
            Close will will called on various other internal objects as a part
            of this, to ensure proper tear-down in GC without relying on finalize.
    
            * History/WebBackForwardList.m:
            (-[WebBackForwardList dealloc]):
            (-[WebBackForwardList finalize]):
            (-[WebBackForwardList _close]):
            * History/WebHistoryItem.m:
            (+[WebHistoryItem _closeObjectsInPendingPageCaches]):
            (+[WebHistoryItem _releaseAllPendingPageCaches]):
            * History/WebHistoryItemPrivate.h:
            * WebCoreSupport/WebFrameBridge.m:
            (-[WebFrameBridge close]):
            (-[WebFrameBridge saveDocumentToPageCache:]):
            (-[WebFrameBridge canGoBackOrForward:]):
            * WebView/WebFrame.m:
            (-[WebFrame _detachFromParent]):
            (-[WebFrame dealloc]):
            (-[WebFrame finalize]):
            * WebView/WebFrameView.m:
            (-[WebFrameView _setWebFrame:]):
            (-[WebFrameView finalize]):
            * WebView/WebHTMLView.m:
            (-[WebHTMLView close]):
            (-[NSArray dealloc]):
            (-[NSArray finalize]):
            * WebView/WebHTMLViewInternal.h:
            * WebView/WebHTMLViewPrivate.h:
            * WebView/WebScriptDebugDelegate.m:
            (-[WebScriptCallFrame _initWithFrame:initWithWebFrame:]):
            (-[WebScriptCallFrame parsedSource:fromURL:sourceId:startLine:errorLine:errorMessage:]):
            (-[WebScriptCallFrame enteredFrame:sourceId:line:]):
            (-[WebScriptCallFrame hitStatement:sourceId:line:]):
            (-[WebScriptCallFrame leavingFrame:sourceId:line:]):
            * WebView/WebScriptDebugDelegatePrivate.h:
            * WebView/WebView.m:
            (-[WebViewPrivate init]):
            (-[WebView _close]):
            (-[WebView dealloc]):
            (-[WebView finalize]):
            (-[WebView viewWillMoveToWindow:]):
            (-[WebView _windowWillClose:]):
            (-[WebView setPreferencesIdentifier:]):
            (-[WebView mainFrame]):
            (-[WebView setHostWindow:]):
            (-[WebView searchFor:direction:caseSensitive:wrap:]):
            (-[WebView writeSelectionWithPasteboardTypes:toPasteboard:]):
            (-[WebView close]):
            (-[WebView setAutoClose:]):
            (-[WebView autoClose]):
            (-[WebView _frameViewAtWindowPoint:]):
            * WebView/WebViewPrivate.h:
    
    WebKitTools:
    
            Reviewed by Darin.
    
            Need to call window close so WebView tears-down completly.
    
            * DumpRenderTree/DumpRenderTree.m:
            (main): call [window close]
    
    
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@15106 268f45cc-cd09-0410-ab3c-d52691b4dbfc
    a6df3ece