[SCM] WebKit Debian packaging branch, debian/unstable, updated. debian/1.1.15-1-40151-g37bb677

darin darin at 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Sat Sep 26 06:20:22 UTC 2009


The following commit has been merged in the debian/unstable branch:
commit deb3dba6c55e9c9a4d1098fb360ef436b2349726
Author: darin <darin at 268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Mon Jun 17 23:49:41 2002 +0000

    	Fixed many of the reasons that we were leaking the world. But we still leak
    	KHTMLPart objects, so there must be more problems.
    
    	* WebCoreSupport.subproj/IFResourceURLHandleClient.m:
    	(+[IFResourceURLHandleClient startLoadingResource:withURL:dataSource:]):
    	Add missing autorelease. Without this, we leak the world.
    	(-[IFResourceURLHandleClient IFURLHandle:resourceDidFailLoadingWithResult:]):
    	Weaken assert. It was firing before.
    
    	* WebCoreSupport.subproj/IFWebCoreBridge.mm:
    	(-[IFWebCoreBridge receivedData:withDataSource:]): Don't retain the
    	dataSource any more. Without this, we leak the world.
    
    	* WebView.subproj/IFWebControllerPrivate.mm:
    	(-[IFWebControllerPrivate dealloc]): Release the policy handler too.
    	Without this, we leak the world.
    
    	* WebView.subproj/IFWebDataSourcePrivate.mm:
    	(-[IFWebDataSourcePrivate dealloc]): Release resourceData, representation,
    	downloadPath, encoding, and contentType. Without this, we leak the world.
    
    	* WebView.subproj/IFWebFrame.mm:
    	(-[IFWebFrame initWithName:webView:provisionalDataSource:controller:]):
    	Release the dummy data source after setting it up so it doesn't leak.
    
    	* WebView.subproj/IFHTMLViewPrivate.mm:
    	(-[IFHTMLViewPrivate dealloc]): Don't release the controller, we didn't retain it.
    	(-[IFHTMLView _resetWidget]): Delete the provisional widget too.
    
    	* WebView.subproj/IFWebDataSourcePrivate.h: Remove unused "children" array.
    
    	* WebCoreSupport.subproj/IFImageRenderer.m: Fix comment.
    	* WebView.subproj/IFHTMLView.mm: Fix comments.
    
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@1395 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/WebCore/kwq/KWQKHTMLPart.mm b/WebCore/kwq/KWQKHTMLPart.mm
index d61a21d..7da4a00 100644
--- a/WebCore/kwq/KWQKHTMLPart.mm
+++ b/WebCore/kwq/KWQKHTMLPart.mm
@@ -62,6 +62,7 @@ KWQKHTMLPartImpl::KWQKHTMLPartImpl(KHTMLPart *p)
 
 KWQKHTMLPartImpl::~KWQKHTMLPartImpl()
 {
+    NSLog(@"deallocating KWQKHTMLPartImpl");
     killTimer(m_redirectionTimer);
 }
 
diff --git a/WebCore/kwq/KWQKHTMLPartImpl.mm b/WebCore/kwq/KWQKHTMLPartImpl.mm
index d61a21d..7da4a00 100644
--- a/WebCore/kwq/KWQKHTMLPartImpl.mm
+++ b/WebCore/kwq/KWQKHTMLPartImpl.mm
@@ -62,6 +62,7 @@ KWQKHTMLPartImpl::KWQKHTMLPartImpl(KHTMLPart *p)
 
 KWQKHTMLPartImpl::~KWQKHTMLPartImpl()
 {
+    NSLog(@"deallocating KWQKHTMLPartImpl");
     killTimer(m_redirectionTimer);
 }
 
diff --git a/WebKit/ChangeLog b/WebKit/ChangeLog
index 13717d4..d8383c4 100644
--- a/WebKit/ChangeLog
+++ b/WebKit/ChangeLog
@@ -1,3 +1,39 @@
+2002-06-17  Darin Adler  <darin at apple.com>
+
+	Fixed many of the reasons that we were leaking the world. But we still leak
+	KHTMLPart objects, so there must be more problems.
+
+	* WebCoreSupport.subproj/IFResourceURLHandleClient.m:
+	(+[IFResourceURLHandleClient startLoadingResource:withURL:dataSource:]):
+	Add missing autorelease. Without this, we leak the world.
+	(-[IFResourceURLHandleClient IFURLHandle:resourceDidFailLoadingWithResult:]):
+	Weaken assert. It was firing before.
+
+	* WebCoreSupport.subproj/IFWebCoreBridge.mm:
+	(-[IFWebCoreBridge receivedData:withDataSource:]): Don't retain the
+	dataSource any more. Without this, we leak the world.
+
+	* WebView.subproj/IFWebControllerPrivate.mm:
+	(-[IFWebControllerPrivate dealloc]): Release the policy handler too.
+	Without this, we leak the world.
+
+	* WebView.subproj/IFWebDataSourcePrivate.mm:
+	(-[IFWebDataSourcePrivate dealloc]): Release resourceData, representation,
+	downloadPath, encoding, and contentType. Without this, we leak the world.
+
+	* WebView.subproj/IFWebFrame.mm:
+	(-[IFWebFrame initWithName:webView:provisionalDataSource:controller:]):
+	Release the dummy data source after setting it up so it doesn't leak.
+
+	* WebView.subproj/IFHTMLViewPrivate.mm:
+	(-[IFHTMLViewPrivate dealloc]): Don't release the controller, we didn't retain it.
+	(-[IFHTMLView _resetWidget]): Delete the provisional widget too.
+
+	* WebView.subproj/IFWebDataSourcePrivate.h: Remove unused "children" array.
+
+	* WebCoreSupport.subproj/IFImageRenderer.m: Fix comment.
+	* WebView.subproj/IFHTMLView.mm: Fix comments.
+
 2002-06-17  Richard Williamson  <rjw at apple.com>
 
     Fixed call to renamed progress method.
@@ -11,7 +47,6 @@
 	(-[IFWebDataSource contentType]): no changes
 	(-[IFWebDataSource fileType]): added. Returns extension based on MIME.
 
->>>>>>> 1.387
 2002-06-17  Richard Williamson  <rjw at apple.com>
 
     Added explicit complete check for resources, rather
diff --git a/WebKit/ChangeLog-2002-12-03 b/WebKit/ChangeLog-2002-12-03
index 13717d4..d8383c4 100644
--- a/WebKit/ChangeLog-2002-12-03
+++ b/WebKit/ChangeLog-2002-12-03
@@ -1,3 +1,39 @@
+2002-06-17  Darin Adler  <darin at apple.com>
+
+	Fixed many of the reasons that we were leaking the world. But we still leak
+	KHTMLPart objects, so there must be more problems.
+
+	* WebCoreSupport.subproj/IFResourceURLHandleClient.m:
+	(+[IFResourceURLHandleClient startLoadingResource:withURL:dataSource:]):
+	Add missing autorelease. Without this, we leak the world.
+	(-[IFResourceURLHandleClient IFURLHandle:resourceDidFailLoadingWithResult:]):
+	Weaken assert. It was firing before.
+
+	* WebCoreSupport.subproj/IFWebCoreBridge.mm:
+	(-[IFWebCoreBridge receivedData:withDataSource:]): Don't retain the
+	dataSource any more. Without this, we leak the world.
+
+	* WebView.subproj/IFWebControllerPrivate.mm:
+	(-[IFWebControllerPrivate dealloc]): Release the policy handler too.
+	Without this, we leak the world.
+
+	* WebView.subproj/IFWebDataSourcePrivate.mm:
+	(-[IFWebDataSourcePrivate dealloc]): Release resourceData, representation,
+	downloadPath, encoding, and contentType. Without this, we leak the world.
+
+	* WebView.subproj/IFWebFrame.mm:
+	(-[IFWebFrame initWithName:webView:provisionalDataSource:controller:]):
+	Release the dummy data source after setting it up so it doesn't leak.
+
+	* WebView.subproj/IFHTMLViewPrivate.mm:
+	(-[IFHTMLViewPrivate dealloc]): Don't release the controller, we didn't retain it.
+	(-[IFHTMLView _resetWidget]): Delete the provisional widget too.
+
+	* WebView.subproj/IFWebDataSourcePrivate.h: Remove unused "children" array.
+
+	* WebCoreSupport.subproj/IFImageRenderer.m: Fix comment.
+	* WebView.subproj/IFHTMLView.mm: Fix comments.
+
 2002-06-17  Richard Williamson  <rjw at apple.com>
 
     Fixed call to renamed progress method.
@@ -11,7 +47,6 @@
 	(-[IFWebDataSource contentType]): no changes
 	(-[IFWebDataSource fileType]): added. Returns extension based on MIME.
 
->>>>>>> 1.387
 2002-06-17  Richard Williamson  <rjw at apple.com>
 
     Added explicit complete check for resources, rather
diff --git a/WebKit/WebCoreSupport.subproj/IFImageRenderer.m b/WebKit/WebCoreSupport.subproj/IFImageRenderer.m
index 4e06499..6fd206b 100644
--- a/WebKit/WebCoreSupport.subproj/IFImageRenderer.m
+++ b/WebKit/WebCoreSupport.subproj/IFImageRenderer.m
@@ -1,4 +1,4 @@
-/*	IFAnimatedImage.m
+/*	IFImageRenderer.m
 	Copyright 2002, Apple, Inc. All rights reserved.
 */
 
@@ -114,7 +114,7 @@
     
     [self setCurrentFrame: currentFrame];
     
-    if ([frameView canDraw]){
+    if ([frameView canDraw]) {
         [frameView lockFocus];
         [self drawInRect:targetRect
                 fromRect:imageRect
@@ -148,9 +148,9 @@
     }
 
     [self drawInRect: ir 
-                    fromRect: fr
-                    operation: NSCompositeSourceOver	// Renders transparency correctly
-                    fraction: 1.0];
+            fromRect: fr
+           operation: NSCompositeSourceOver	// Renders transparency correctly
+            fraction: 1.0];
 }
 
 - (void)stopAnimation
diff --git a/WebKit/WebCoreSupport.subproj/IFResourceURLHandleClient.m b/WebKit/WebCoreSupport.subproj/IFResourceURLHandleClient.m
index a84f6d6..6aed69a 100644
--- a/WebKit/WebCoreSupport.subproj/IFResourceURLHandleClient.m
+++ b/WebKit/WebCoreSupport.subproj/IFResourceURLHandleClient.m
@@ -51,7 +51,7 @@
     IFURLHandle *handle;
     IFResourceURLHandleClient *client;
     
-    handle = [[IFURLHandle alloc] initWithURL:URL attributes:nil flags:0];
+    handle = [[[IFURLHandle alloc] initWithURL:URL attributes:nil flags:0] autorelease];
     if (handle == nil) {
         [rLoader cancel];
 
@@ -145,7 +145,11 @@
 
 - (void)IFURLHandle:(IFURLHandle *)handle resourceDidFailLoadingWithResult:(IFError *)error
 {
+#ifdef WEBFOUNDATION_LOAD_MESSAGES_FIXED
     WEBKIT_ASSERT([currentURL isEqual:[handle redirectedURL] ? [handle redirectedURL] : [handle url]]);
+#else
+    WEBKIT_ASSERT(currentURL == nil || [currentURL isEqual:[handle redirectedURL] ? [handle redirectedURL] : [handle url]]);
+#endif    
 
     [dataSource _removeURLHandle:handle];
     
diff --git a/WebKit/WebCoreSupport.subproj/IFWebCoreBridge.mm b/WebKit/WebCoreSupport.subproj/IFWebCoreBridge.mm
index dd690fe..a715cc2 100644
--- a/WebKit/WebCoreSupport.subproj/IFWebCoreBridge.mm
+++ b/WebKit/WebCoreSupport.subproj/IFWebCoreBridge.mm
@@ -26,13 +26,6 @@
 
 @implementation IFWebCoreBridge
 
-- (void)dealloc
-{
-    [dataSource release];
-    
-    [super dealloc];
-}
-
 - (id <WebCoreFrame>)frame
 {
     return [[dataSource webFrame] _bridgeFrame];
@@ -114,7 +107,7 @@
 - (void)receivedData:(NSData *)data withDataSource:(IFWebDataSource *)withDataSource
 {
     if (dataSource == nil) {
-        dataSource = [withDataSource retain];
+        dataSource = withDataSource; // FIXME: non-retained because data source owns representation owns bridge
         [self openURL:[dataSource inputURL]];
     } else {
         WEBKIT_ASSERT(dataSource == withDataSource);
diff --git a/WebKit/WebCoreSupport.subproj/WebBridge.m b/WebKit/WebCoreSupport.subproj/WebBridge.m
index dd690fe..a715cc2 100644
--- a/WebKit/WebCoreSupport.subproj/WebBridge.m
+++ b/WebKit/WebCoreSupport.subproj/WebBridge.m
@@ -26,13 +26,6 @@
 
 @implementation IFWebCoreBridge
 
-- (void)dealloc
-{
-    [dataSource release];
-    
-    [super dealloc];
-}
-
 - (id <WebCoreFrame>)frame
 {
     return [[dataSource webFrame] _bridgeFrame];
@@ -114,7 +107,7 @@
 - (void)receivedData:(NSData *)data withDataSource:(IFWebDataSource *)withDataSource
 {
     if (dataSource == nil) {
-        dataSource = [withDataSource retain];
+        dataSource = withDataSource; // FIXME: non-retained because data source owns representation owns bridge
         [self openURL:[dataSource inputURL]];
     } else {
         WEBKIT_ASSERT(dataSource == withDataSource);
diff --git a/WebKit/WebCoreSupport.subproj/WebImageRenderer.m b/WebKit/WebCoreSupport.subproj/WebImageRenderer.m
index 4e06499..6fd206b 100644
--- a/WebKit/WebCoreSupport.subproj/WebImageRenderer.m
+++ b/WebKit/WebCoreSupport.subproj/WebImageRenderer.m
@@ -1,4 +1,4 @@
-/*	IFAnimatedImage.m
+/*	IFImageRenderer.m
 	Copyright 2002, Apple, Inc. All rights reserved.
 */
 
@@ -114,7 +114,7 @@
     
     [self setCurrentFrame: currentFrame];
     
-    if ([frameView canDraw]){
+    if ([frameView canDraw]) {
         [frameView lockFocus];
         [self drawInRect:targetRect
                 fromRect:imageRect
@@ -148,9 +148,9 @@
     }
 
     [self drawInRect: ir 
-                    fromRect: fr
-                    operation: NSCompositeSourceOver	// Renders transparency correctly
-                    fraction: 1.0];
+            fromRect: fr
+           operation: NSCompositeSourceOver	// Renders transparency correctly
+            fraction: 1.0];
 }
 
 - (void)stopAnimation
diff --git a/WebKit/WebCoreSupport.subproj/WebSubresourceClient.m b/WebKit/WebCoreSupport.subproj/WebSubresourceClient.m
index a84f6d6..6aed69a 100644
--- a/WebKit/WebCoreSupport.subproj/WebSubresourceClient.m
+++ b/WebKit/WebCoreSupport.subproj/WebSubresourceClient.m
@@ -51,7 +51,7 @@
     IFURLHandle *handle;
     IFResourceURLHandleClient *client;
     
-    handle = [[IFURLHandle alloc] initWithURL:URL attributes:nil flags:0];
+    handle = [[[IFURLHandle alloc] initWithURL:URL attributes:nil flags:0] autorelease];
     if (handle == nil) {
         [rLoader cancel];
 
@@ -145,7 +145,11 @@
 
 - (void)IFURLHandle:(IFURLHandle *)handle resourceDidFailLoadingWithResult:(IFError *)error
 {
+#ifdef WEBFOUNDATION_LOAD_MESSAGES_FIXED
     WEBKIT_ASSERT([currentURL isEqual:[handle redirectedURL] ? [handle redirectedURL] : [handle url]]);
+#else
+    WEBKIT_ASSERT(currentURL == nil || [currentURL isEqual:[handle redirectedURL] ? [handle redirectedURL] : [handle url]]);
+#endif    
 
     [dataSource _removeURLHandle:handle];
     
diff --git a/WebKit/WebCoreSupport.subproj/WebSubresourceLoader.m b/WebKit/WebCoreSupport.subproj/WebSubresourceLoader.m
index a84f6d6..6aed69a 100644
--- a/WebKit/WebCoreSupport.subproj/WebSubresourceLoader.m
+++ b/WebKit/WebCoreSupport.subproj/WebSubresourceLoader.m
@@ -51,7 +51,7 @@
     IFURLHandle *handle;
     IFResourceURLHandleClient *client;
     
-    handle = [[IFURLHandle alloc] initWithURL:URL attributes:nil flags:0];
+    handle = [[[IFURLHandle alloc] initWithURL:URL attributes:nil flags:0] autorelease];
     if (handle == nil) {
         [rLoader cancel];
 
@@ -145,7 +145,11 @@
 
 - (void)IFURLHandle:(IFURLHandle *)handle resourceDidFailLoadingWithResult:(IFError *)error
 {
+#ifdef WEBFOUNDATION_LOAD_MESSAGES_FIXED
     WEBKIT_ASSERT([currentURL isEqual:[handle redirectedURL] ? [handle redirectedURL] : [handle url]]);
+#else
+    WEBKIT_ASSERT(currentURL == nil || [currentURL isEqual:[handle redirectedURL] ? [handle redirectedURL] : [handle url]]);
+#endif    
 
     [dataSource _removeURLHandle:handle];
     
diff --git a/WebKit/WebView.subproj/IFHTMLView.mm b/WebKit/WebView.subproj/IFHTMLView.mm
index 0402f31..49a9e74 100644
--- a/WebKit/WebView.subproj/IFHTMLView.mm
+++ b/WebKit/WebView.subproj/IFHTMLView.mm
@@ -43,7 +43,7 @@
     _private->canDragTo = YES;
     _private->canDragFrom = YES;
 
-    // We added add/remove this view as a mouse moved observer when it's window becomes/resigns main.
+    // We added add/remove this view as a mouse moved observer when its window becomes/resigns main.
     [[NSNotificationCenter defaultCenter] addObserver: self selector: @selector(windowDidBecomeMain:) name: NSWindowDidBecomeMainNotification object: nil];
     [[NSNotificationCenter defaultCenter] addObserver: self selector: @selector(windowDidResignMain:) name: NSWindowDidResignMainNotification object: nil];
 
@@ -120,7 +120,7 @@
 
     // Only delete the widget if we're the top level widget.  In other
     // cases the widget is associated with a RenderFrame which will
-    // delete it's widget.
+    // delete its widget.
     if ([dataSource isMainDocument] && data->widget)
         delete data->widget;
 
diff --git a/WebKit/WebView.subproj/IFHTMLViewPrivate.mm b/WebKit/WebView.subproj/IFHTMLViewPrivate.mm
index 354dfaa..9b498b2 100644
--- a/WebKit/WebView.subproj/IFHTMLViewPrivate.mm
+++ b/WebKit/WebView.subproj/IFHTMLViewPrivate.mm
@@ -12,14 +12,13 @@
 
 // Includes from KDE
 #import <khtmlview.h>
-#import <html/html_documentimpl.h>
-#import "IFWebController.h"
 
 @implementation IFHTMLViewPrivate
 
 - (void)dealloc
 {
-    [controller release];
+    // FIXME: Do we leak the provisional widget in the non-main frame cases?
+    
     [cursor release];
 
     [super dealloc];
@@ -31,6 +30,8 @@
 
 - (void)_resetWidget
 {
+    delete _private->provisionalWidget;
+    _private->provisionalWidget = 0;
     delete _private->widget;
     _private->widget = 0;
 }
diff --git a/WebKit/WebView.subproj/IFWebControllerPrivate.mm b/WebKit/WebView.subproj/IFWebControllerPrivate.mm
index 69938d4..531b13d 100644
--- a/WebKit/WebView.subproj/IFWebControllerPrivate.mm
+++ b/WebKit/WebView.subproj/IFWebControllerPrivate.mm
@@ -54,6 +54,7 @@
     [mainFrame reset];
     [mainFrame autorelease];
     [resourceProgressHandler autorelease];
+    [policyHandler autorelease];
 
     [super dealloc];
 }
diff --git a/WebKit/WebView.subproj/IFWebDataSourcePrivate.h b/WebKit/WebView.subproj/IFWebDataSourcePrivate.h
index ef948ef..96b0bf5 100644
--- a/WebKit/WebView.subproj/IFWebDataSourcePrivate.h
+++ b/WebKit/WebView.subproj/IFWebDataSourcePrivate.h
@@ -22,7 +22,6 @@
     id <IFDocumentRepresentation> representation;
     
     IFWebDataSource *parent;
-    NSMutableArray *children;
     
     IFWebController *controller;
     
diff --git a/WebKit/WebView.subproj/IFWebDataSourcePrivate.mm b/WebKit/WebView.subproj/IFWebDataSourcePrivate.mm
index 9db25cb..6ff2409 100644
--- a/WebKit/WebView.subproj/IFWebDataSourcePrivate.mm
+++ b/WebKit/WebView.subproj/IFWebDataSourcePrivate.mm
@@ -57,17 +57,22 @@ static NSMutableDictionary *_repTypes=nil;
     for (i = 0; i < count; i++) {
         [(IFWebFrame *)[childFrames objectAtIndex: i] _setController: nil];
     }
-    [frames release];
+    
+    [resourceData release];
+    [representation release];
     [inputURL release];
     [finalURL release];
-    [urlHandles release];
+    [frames release];
     [mainHandle release];
     [mainURLHandleClient release];
+    [urlHandles release];
     [pageTitle autorelease];
-    [locationChangeHandler release];
- 
+    [downloadPath autorelease];
+    [encoding autorelease];
+    [contentType autorelease];
     [errors release];
     [mainDocumentError release];
+    [locationChangeHandler release];
 
     [super dealloc];
 }
@@ -284,7 +289,7 @@ static NSMutableDictionary *_repTypes=nil;
     _private->locationChangeHandler = l;
 }
 
-- (void) _setDownloadPath:(NSString *)path
+- (void)_setDownloadPath:(NSString *)path
 {
     [_private->downloadPath release];
     _private->downloadPath = [path retain];
diff --git a/WebKit/WebView.subproj/IFWebFrame.mm b/WebKit/WebView.subproj/IFWebFrame.mm
index de2abc4..feca593 100644
--- a/WebKit/WebView.subproj/IFWebFrame.mm
+++ b/WebKit/WebView.subproj/IFWebFrame.mm
@@ -43,7 +43,7 @@
     [self setController: c];
 
     if (d == nil) {
-	// set a dummy data source so that the main from for a
+	// Set a dummy data source so that the main frame for a
 	// newly-created empty window has a KHTMLPart. JavaScript
 	// always creates new windows initially empty, and then wants
 	// to use the main frame's part to make the new window load
@@ -54,6 +54,7 @@
 	IFWebDataSource *dummyDataSource = [[IFWebDataSource alloc] initWithURL:nil];
         [dummyDataSource _setController: [self controller]];
         [_private setProvisionalDataSource: dummyDataSource];
+        [dummyDataSource release];
 
     // Allow controller to override?
     } else if ([self setProvisionalDataSource: d] == NO){
diff --git a/WebKit/WebView.subproj/WebControllerPrivate.m b/WebKit/WebView.subproj/WebControllerPrivate.m
index 69938d4..531b13d 100644
--- a/WebKit/WebView.subproj/WebControllerPrivate.m
+++ b/WebKit/WebView.subproj/WebControllerPrivate.m
@@ -54,6 +54,7 @@
     [mainFrame reset];
     [mainFrame autorelease];
     [resourceProgressHandler autorelease];
+    [policyHandler autorelease];
 
     [super dealloc];
 }
diff --git a/WebKit/WebView.subproj/WebDataSourcePrivate.h b/WebKit/WebView.subproj/WebDataSourcePrivate.h
index ef948ef..96b0bf5 100644
--- a/WebKit/WebView.subproj/WebDataSourcePrivate.h
+++ b/WebKit/WebView.subproj/WebDataSourcePrivate.h
@@ -22,7 +22,6 @@
     id <IFDocumentRepresentation> representation;
     
     IFWebDataSource *parent;
-    NSMutableArray *children;
     
     IFWebController *controller;
     
diff --git a/WebKit/WebView.subproj/WebDataSourcePrivate.m b/WebKit/WebView.subproj/WebDataSourcePrivate.m
index 9db25cb..6ff2409 100644
--- a/WebKit/WebView.subproj/WebDataSourcePrivate.m
+++ b/WebKit/WebView.subproj/WebDataSourcePrivate.m
@@ -57,17 +57,22 @@ static NSMutableDictionary *_repTypes=nil;
     for (i = 0; i < count; i++) {
         [(IFWebFrame *)[childFrames objectAtIndex: i] _setController: nil];
     }
-    [frames release];
+    
+    [resourceData release];
+    [representation release];
     [inputURL release];
     [finalURL release];
-    [urlHandles release];
+    [frames release];
     [mainHandle release];
     [mainURLHandleClient release];
+    [urlHandles release];
     [pageTitle autorelease];
-    [locationChangeHandler release];
- 
+    [downloadPath autorelease];
+    [encoding autorelease];
+    [contentType autorelease];
     [errors release];
     [mainDocumentError release];
+    [locationChangeHandler release];
 
     [super dealloc];
 }
@@ -284,7 +289,7 @@ static NSMutableDictionary *_repTypes=nil;
     _private->locationChangeHandler = l;
 }
 
-- (void) _setDownloadPath:(NSString *)path
+- (void)_setDownloadPath:(NSString *)path
 {
     [_private->downloadPath release];
     _private->downloadPath = [path retain];
diff --git a/WebKit/WebView.subproj/WebFrame.m b/WebKit/WebView.subproj/WebFrame.m
index de2abc4..feca593 100644
--- a/WebKit/WebView.subproj/WebFrame.m
+++ b/WebKit/WebView.subproj/WebFrame.m
@@ -43,7 +43,7 @@
     [self setController: c];
 
     if (d == nil) {
-	// set a dummy data source so that the main from for a
+	// Set a dummy data source so that the main frame for a
 	// newly-created empty window has a KHTMLPart. JavaScript
 	// always creates new windows initially empty, and then wants
 	// to use the main frame's part to make the new window load
@@ -54,6 +54,7 @@
 	IFWebDataSource *dummyDataSource = [[IFWebDataSource alloc] initWithURL:nil];
         [dummyDataSource _setController: [self controller]];
         [_private setProvisionalDataSource: dummyDataSource];
+        [dummyDataSource release];
 
     // Allow controller to override?
     } else if ([self setProvisionalDataSource: d] == NO){
diff --git a/WebKit/WebView.subproj/WebHTMLView.m b/WebKit/WebView.subproj/WebHTMLView.m
index 0402f31..49a9e74 100644
--- a/WebKit/WebView.subproj/WebHTMLView.m
+++ b/WebKit/WebView.subproj/WebHTMLView.m
@@ -43,7 +43,7 @@
     _private->canDragTo = YES;
     _private->canDragFrom = YES;
 
-    // We added add/remove this view as a mouse moved observer when it's window becomes/resigns main.
+    // We added add/remove this view as a mouse moved observer when its window becomes/resigns main.
     [[NSNotificationCenter defaultCenter] addObserver: self selector: @selector(windowDidBecomeMain:) name: NSWindowDidBecomeMainNotification object: nil];
     [[NSNotificationCenter defaultCenter] addObserver: self selector: @selector(windowDidResignMain:) name: NSWindowDidResignMainNotification object: nil];
 
@@ -120,7 +120,7 @@
 
     // Only delete the widget if we're the top level widget.  In other
     // cases the widget is associated with a RenderFrame which will
-    // delete it's widget.
+    // delete its widget.
     if ([dataSource isMainDocument] && data->widget)
         delete data->widget;
 
diff --git a/WebKit/WebView.subproj/WebHTMLViewPrivate.m b/WebKit/WebView.subproj/WebHTMLViewPrivate.m
index 354dfaa..9b498b2 100644
--- a/WebKit/WebView.subproj/WebHTMLViewPrivate.m
+++ b/WebKit/WebView.subproj/WebHTMLViewPrivate.m
@@ -12,14 +12,13 @@
 
 // Includes from KDE
 #import <khtmlview.h>
-#import <html/html_documentimpl.h>
-#import "IFWebController.h"
 
 @implementation IFHTMLViewPrivate
 
 - (void)dealloc
 {
-    [controller release];
+    // FIXME: Do we leak the provisional widget in the non-main frame cases?
+    
     [cursor release];
 
     [super dealloc];
@@ -31,6 +30,8 @@
 
 - (void)_resetWidget
 {
+    delete _private->provisionalWidget;
+    _private->provisionalWidget = 0;
     delete _private->widget;
     _private->widget = 0;
 }
diff --git a/WebKit/WebView.subproj/WebViewPrivate.m b/WebKit/WebView.subproj/WebViewPrivate.m
index 69938d4..531b13d 100644
--- a/WebKit/WebView.subproj/WebViewPrivate.m
+++ b/WebKit/WebView.subproj/WebViewPrivate.m
@@ -54,6 +54,7 @@
     [mainFrame reset];
     [mainFrame autorelease];
     [resourceProgressHandler autorelease];
+    [policyHandler autorelease];
 
     [super dealloc];
 }

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list