[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 07:47:26 UTC 2009


The following commit has been merged in the debian/unstable branch:
commit 0a1ad70739e91bb6eda40f6b14fb77ffe3ee4d23
Author: darin <darin at 268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Tue Jul 15 04:17:53 2003 +0000

            Reviewed by Maciej.
    
            - make some improvements to handling of the timer, inspired by some bug reports
    
            * WebView.subproj/WebFramePrivate.m:
            (-[WebFramePrivate dealloc]): Instead of releasing the timer, assert it is nil.
            (-[WebFrame _detachFromParent]): Invalidate and release the timer after finishing
            dealing with self, in case the reference from the timer is the last one.
            (-[WebFrame _timedLayout:]): Release the timer after doing all the other work,
            in case the reference from the timer is the last one.
            (-[WebFrame _setState:]): Release the timer after doing all the other work,
            in case the reference from the timer is the last one.
    
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@4654 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/WebKit/ChangeLog b/WebKit/ChangeLog
index 1ed9812..a042054 100644
--- a/WebKit/ChangeLog
+++ b/WebKit/ChangeLog
@@ -1,5 +1,20 @@
 2003-07-14  Darin Adler  <darin at apple.com>
 
+        Reviewed by Maciej.
+
+        - make some improvements to handling of the timer, inspired by some bug reports
+
+        * WebView.subproj/WebFramePrivate.m:
+        (-[WebFramePrivate dealloc]): Instead of releasing the timer, assert it is nil.
+        (-[WebFrame _detachFromParent]): Invalidate and release the timer after finishing
+        dealing with self, in case the reference from the timer is the last one.
+        (-[WebFrame _timedLayout:]): Release the timer after doing all the other work,
+        in case the reference from the timer is the last one.
+        (-[WebFrame _setState:]): Release the timer after doing all the other work,
+        in case the reference from the timer is the last one.
+
+2003-07-14  Darin Adler  <darin at apple.com>
+
         Rolled out workaround to bug 3298153 -- get "screen font while printing"
         error, bad stuff happens after that (Sherlock, Safari). It turns out the
         real fix was on the WebCore side. Now that we have that fix we don't need
diff --git a/WebKit/WebView.subproj/WebFramePrivate.m b/WebKit/WebView.subproj/WebFramePrivate.m
index 2934519..2a09d6e 100644
--- a/WebKit/WebView.subproj/WebFramePrivate.m
+++ b/WebKit/WebView.subproj/WebFramePrivate.m
@@ -150,6 +150,8 @@ NSString *WebCorePageCacheStateKey = @"WebCorePageCacheState";
 
 - (void)dealloc
 {
+    ASSERT(scheduledLayoutTimer == nil);
+
     [webFrameView _setWebView:nil];
     [dataSource _setWebView:nil];
     [provisionalDataSource _setWebView:nil];
@@ -159,7 +161,6 @@ NSString *WebCorePageCacheStateKey = @"WebCorePageCacheState";
     [dataSource release];
     [provisionalDataSource release];
     [bridge release];
-    [scheduledLayoutTimer release];
     [children release];
 
     [currentItem release];
@@ -402,6 +403,9 @@ NSString *WebCorePageCacheStateKey = @"WebCorePageCacheState";
     WebBridge *bridge = _private->bridge;
     _private->bridge = nil;
 
+    NSTimer *timer = _private->scheduledLayoutTimer;
+    _private->scheduledLayoutTimer = nil;
+    
     [self stopLoading];
     [self _saveScrollPositionToItem:[_private currentItem]];
 
@@ -417,13 +421,12 @@ NSString *WebCorePageCacheStateKey = @"WebCorePageCacheState";
     [self _setDataSource:nil];
     [_private setWebFrameView:nil];
 
-    [_private->scheduledLayoutTimer invalidate];
-    [_private->scheduledLayoutTimer release];
-    _private->scheduledLayoutTimer = nil;
-    
     [bridge close];
     
     [bridge release];
+
+    [timer invalidate];
+    [timer release];
 }
 
 - (void)_setDataSource:(WebDataSource *)ds
@@ -486,11 +489,11 @@ NSString *WebCorePageCacheStateKey = @"WebCorePageCacheState";
     }
 }
 
-- (void)_timedLayout: (id)userInfo
+- (void)_timedLayout:(id)userInfo
 {
     LOG(Timing, "%@:  state = %s", [self name], stateNames[_private->state]);
 
-    [_private->scheduledLayoutTimer release];
+    NSTimer *timer = _private->scheduledLayoutTimer;
     _private->scheduledLayoutTimer = nil;
     
     if (_private->state >= WebFrameStateLayoutAcceptable) {
@@ -526,6 +529,8 @@ NSString *WebCorePageCacheStateKey = @"WebCorePageCacheState";
         if ([self webView])
             LOG(Timing, "%@:  NOT performing timed layout (not needed), %f seconds since start of document load", [self name], CFAbsoluteTimeGetCurrent() - [[[[self webView] mainFrame] dataSource] _loadingStartedTime]);
     }
+
+    [timer release];
 }
 
 
@@ -855,11 +860,12 @@ static CFAbsoluteTime _timeOfLastCompletedLoad;
         // FIXME: This overrides the setCopiesOnScroll setting done by
         // WebCore based on whether the page's contents are dynamic or not.
         [[sv contentView] setCopiesOnScroll:YES];
-        [_private->scheduledLayoutTimer invalidate];
-        [_private->scheduledLayoutTimer release];
+        NSTimer *timer = _private->scheduledLayoutTimer;
         _private->scheduledLayoutTimer = nil;
         [_private setPreviousItem:nil];
         _timeOfLastCompletedLoad = CFAbsoluteTimeGetCurrent();
+        [timer invalidate];
+        [timer release];
     }
 }
 

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list