[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:37:42 UTC 2009
The following commit has been merged in the debian/unstable branch:
commit 5673709d703342cc22e3d8815e24d0942778f9e6
Author: darin <darin at 268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Tue Sep 10 00:33:11 2002 +0000
- fixed 3003605 -- Leaking 1 WebView after second run of static PLT
Fixing this should also help with footprint.
* WebView.subproj/WebFrame.m:
(-[WebFrame dealloc]): Remove old workaround for problem where we
always deallocated the frames from timer cleanup. I found a better
fix for this.
(-[WebFrame stopLoading]): Explicitly fire the scheduled layout
timer if any when we stop loading, rather than leaving it hanging.
* WebView.subproj/WebFramePrivate.m: (-[WebFrame _setState:]):
Explicitly fire the scheduled layout timer if any.
* WebView.subproj/WebDataSource.m: (-[WebDataSource isLoading]):
Use an autorelease pool here so we don't end up putting all the
frames in the main event loop's autorelease pool.
* Bookmarks.subproj/WebBookmark.m:
(-[WebBookmark init]): Use copy instead of retain.
(-[WebBookmark identifier]): Use copy instead of retain.
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@2016 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/WebKit/Bookmarks.subproj/WebBookmark.m b/WebKit/Bookmarks.subproj/WebBookmark.m
index a2d8ca5..fb6ad36 100644
--- a/WebKit/Bookmarks.subproj/WebBookmark.m
+++ b/WebKit/Bookmarks.subproj/WebBookmark.m
@@ -30,7 +30,7 @@ static unsigned _highestUsedID = 0;
- (id)init
{
[super init];
- _identifier = [[WebBookmark _generateUniqueIdentifier] retain];
+ _identifier = [[WebBookmark _generateUniqueIdentifier] copy];
return self;
}
@@ -45,7 +45,7 @@ static unsigned _highestUsedID = 0;
- (NSString *)identifier
{
ASSERT(_identifier != nil);
- return [[_identifier retain] autorelease];
+ return [[_identifier copy] autorelease];
}
- (id)copyWithZone:(NSZone *)zone
diff --git a/WebKit/ChangeLog b/WebKit/ChangeLog
index 25620bb..857d1d5 100644
--- a/WebKit/ChangeLog
+++ b/WebKit/ChangeLog
@@ -1,3 +1,27 @@
+2002-09-09 Darin Adler <darin at apple.com>
+
+ - fixed 3003605 -- Leaking 1 WebView after second run of static PLT
+
+ Fixing this should also help with footprint.
+
+ * WebView.subproj/WebFrame.m:
+ (-[WebFrame dealloc]): Remove old workaround for problem where we
+ always deallocated the frames from timer cleanup. I found a better
+ fix for this.
+ (-[WebFrame stopLoading]): Explicitly fire the scheduled layout
+ timer if any when we stop loading, rather than leaving it hanging.
+
+ * WebView.subproj/WebFramePrivate.m: (-[WebFrame _setState:]):
+ Explicitly fire the scheduled layout timer if any.
+
+ * WebView.subproj/WebDataSource.m: (-[WebDataSource isLoading]):
+ Use an autorelease pool here so we don't end up putting all the
+ frames in the main event loop's autorelease pool.
+
+ * Bookmarks.subproj/WebBookmark.m:
+ (-[WebBookmark init]): Use copy instead of retain.
+ (-[WebBookmark identifier]): Use copy instead of retain.
+
2002-09-09 ken <kocienda at apple.com>
Missed one call through asking WebResourceHandle for contentLength
diff --git a/WebKit/ChangeLog-2002-12-03 b/WebKit/ChangeLog-2002-12-03
index 25620bb..857d1d5 100644
--- a/WebKit/ChangeLog-2002-12-03
+++ b/WebKit/ChangeLog-2002-12-03
@@ -1,3 +1,27 @@
+2002-09-09 Darin Adler <darin at apple.com>
+
+ - fixed 3003605 -- Leaking 1 WebView after second run of static PLT
+
+ Fixing this should also help with footprint.
+
+ * WebView.subproj/WebFrame.m:
+ (-[WebFrame dealloc]): Remove old workaround for problem where we
+ always deallocated the frames from timer cleanup. I found a better
+ fix for this.
+ (-[WebFrame stopLoading]): Explicitly fire the scheduled layout
+ timer if any when we stop loading, rather than leaving it hanging.
+
+ * WebView.subproj/WebFramePrivate.m: (-[WebFrame _setState:]):
+ Explicitly fire the scheduled layout timer if any.
+
+ * WebView.subproj/WebDataSource.m: (-[WebDataSource isLoading]):
+ Use an autorelease pool here so we don't end up putting all the
+ frames in the main event loop's autorelease pool.
+
+ * Bookmarks.subproj/WebBookmark.m:
+ (-[WebBookmark init]): Use copy instead of retain.
+ (-[WebBookmark identifier]): Use copy instead of retain.
+
2002-09-09 ken <kocienda at apple.com>
Missed one call through asking WebResourceHandle for contentLength
diff --git a/WebKit/WebView.subproj/WebDataSource.m b/WebKit/WebView.subproj/WebDataSource.m
index ad48c46..7e6fd7d 100644
--- a/WebKit/WebView.subproj/WebDataSource.m
+++ b/WebKit/WebView.subproj/WebDataSource.m
@@ -226,16 +226,20 @@
if ([_private->subresourceClients count]) {
return YES;
}
-
+
+ // Put in the auto-release pool because it's common to call this from a run loop source,
+ // and then the entire list of frames lasts until the next autorelease.
+ NSAutoreleasePool *pool = [NSAutoreleasePool new];
NSEnumerator *e = [[self children] objectEnumerator];
WebFrame *childFrame;
while ((childFrame = [e nextObject])) {
if ([[childFrame dataSource] isLoading] || [[childFrame provisionalDataSource] isLoading]) {
- return YES;
+ break;
}
}
+ [pool release];
- return NO;
+ return childFrame != nil;
}
diff --git a/WebKit/WebView.subproj/WebFrame.m b/WebKit/WebView.subproj/WebFrame.m
index 2f94224..607440f 100644
--- a/WebKit/WebView.subproj/WebFrame.m
+++ b/WebKit/WebView.subproj/WebFrame.m
@@ -60,17 +60,8 @@
{
--WebFrameCount;
- // Because WebFrame objects are typically deallocated by timer cleanup, and the AppKit
- // does not use an explicit autorelease pool in that case, we make our own.
- // Among other things, this makes world leak checking in the Page Load Test work better.
- // It would be nice to find a more general workaround for this (bug 3003650).
-
- NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
-
[_private release];
[super dealloc];
-
- [pool release];
}
- (NSString *)name
@@ -190,6 +181,8 @@
{
[_private->provisionalDataSource stopLoading];
[_private->dataSource stopLoading];
+ [_private->scheduledLayoutTimer fire];
+ ASSERT(_private->scheduledLayoutTimer == nil);
}
@@ -216,9 +209,9 @@
- (void)reset
{
- [_private setDataSource: nil];
- [_private setWebView: nil];
-
+ [_private setDataSource:nil];
+ [_private setWebView:nil];
+
[_private->scheduledLayoutTimer invalidate];
[_private->scheduledLayoutTimer release];
_private->scheduledLayoutTimer = nil;
diff --git a/WebKit/WebView.subproj/WebFramePrivate.m b/WebKit/WebView.subproj/WebFramePrivate.m
index 61b0cc8..9135448 100644
--- a/WebKit/WebView.subproj/WebFramePrivate.m
+++ b/WebKit/WebView.subproj/WebFramePrivate.m
@@ -361,6 +361,8 @@ static const char * const stateNames[] = {
NSScrollView *sv = [[self webView] frameScrollView];
[sv setDrawsBackground: YES];
[[sv contentView] setCopiesOnScroll: YES];
+ [_private->scheduledLayoutTimer fire];
+ ASSERT(_private->scheduledLayoutTimer == nil);
}
}
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list