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

rjw rjw at 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Sat Sep 26 07:22:57 UTC 2009


The following commit has been merged in the debian/unstable branch:
commit 9a483b8a08dd608c73217b7f4ecfc3eced23a68d
Author: rjw <rjw at 268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Thu Jan 30 22:17:48 2003 +0000

            Fix for 3156831 (and dupe 3160816).  Don't access userInfo on an invalid NSTimer.
    
            Reviewed by trey.
    
            * kwq/KWQObject.mm:
            (QObject::pauseTimer):
            (QObject::resumeTimers):
    
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@3513 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/WebCore/ChangeLog-2003-10-25 b/WebCore/ChangeLog-2003-10-25
index cc08c58..54bb5cc 100644
--- a/WebCore/ChangeLog-2003-10-25
+++ b/WebCore/ChangeLog-2003-10-25
@@ -1,3 +1,13 @@
+2003-01-30  Richard Williamson   <rjw at apple.com>
+
+        Fix for 3156831 (and dupe 3160816).  Don't access userInfo on an invalid NSTimer.
+        
+        Reviewed by trey.
+
+        * kwq/KWQObject.mm:
+        (QObject::pauseTimer):
+        (QObject::resumeTimers):
+
 2003-01-30  Trey Matteson  <trey at apple.com>
 
 	3160565 - REGRESSION: Can't log in to etrade
diff --git a/WebCore/ChangeLog-2005-08-23 b/WebCore/ChangeLog-2005-08-23
index cc08c58..54bb5cc 100644
--- a/WebCore/ChangeLog-2005-08-23
+++ b/WebCore/ChangeLog-2005-08-23
@@ -1,3 +1,13 @@
+2003-01-30  Richard Williamson   <rjw at apple.com>
+
+        Fix for 3156831 (and dupe 3160816).  Don't access userInfo on an invalid NSTimer.
+        
+        Reviewed by trey.
+
+        * kwq/KWQObject.mm:
+        (QObject::pauseTimer):
+        (QObject::resumeTimers):
+
 2003-01-30  Trey Matteson  <trey at apple.com>
 
 	3160565 - REGRESSION: Can't log in to etrade
diff --git a/WebCore/kwq/KWQObject.mm b/WebCore/kwq/KWQObject.mm
index 3f5c95e..88e4bfd 100644
--- a/WebCore/kwq/KWQObject.mm
+++ b/WebCore/kwq/KWQObject.mm
@@ -138,33 +138,36 @@ void QObject::pauseTimer (int _timerId, const void *key)
     NSMutableDictionary *timers = (NSMutableDictionary *)CFDictionaryGetValue(timerDictionaries, this);
     NSNumber *timerId = [NSNumber numberWithInt:_timerId];
     NSTimer *timer = (NSTimer *)[timers objectForKey:timerId];
-    KWQObjectTimerTarget *target = (KWQObjectTimerTarget *)[timer userInfo];
-    
-    if (target && [timer isValid]){
-        NSDate *fireDate = [timer fireDate];
-        NSTimeInterval remainingTime = [fireDate timeIntervalSinceDate: [NSDate date]];
-    
-        if (remainingTime < 0)
-            remainingTime = DBL_EPSILON;
-        
-        if (allPausedTimers == NULL) {
-            // The global targets dictionary itself leaks, but the contents are removed
-            // when each timer fires or is killed.
-            allPausedTimers = CFDictionaryCreateMutable(NULL, 0, NULL, &kCFTypeDictionaryValueCallBacks);
-        }
 
-        NSMutableArray *pausedTimers = (NSMutableArray *)CFDictionaryGetValue(allPausedTimers, key);
-        if (pausedTimers == nil) {
-            pausedTimers = [[NSMutableArray alloc] init];
-            CFDictionarySetValue(allPausedTimers, key, pausedTimers);
-            [pausedTimers release];
-        }
+    if ([timer isValid]){
+        KWQObjectTimerTarget *target = (KWQObjectTimerTarget *)[timer userInfo];
+
+        if (target){
+            NSDate *fireDate = [timer fireDate];
+            NSTimeInterval remainingTime = [fireDate timeIntervalSinceDate: [NSDate date]];
         
-        target->remainingTime = remainingTime;
-        [pausedTimers addObject:target];
-                
-        [timer invalidate];
-        [timers removeObjectForKey:timerId];
+            if (remainingTime < 0)
+                remainingTime = DBL_EPSILON;
+            
+            if (allPausedTimers == NULL) {
+                // The global targets dictionary itself leaks, but the contents are removed
+                // when each timer fires or is killed.
+                allPausedTimers = CFDictionaryCreateMutable(NULL, 0, NULL, &kCFTypeDictionaryValueCallBacks);
+            }
+    
+            NSMutableArray *pausedTimers = (NSMutableArray *)CFDictionaryGetValue(allPausedTimers, key);
+            if (pausedTimers == nil) {
+                pausedTimers = [[NSMutableArray alloc] init];
+                CFDictionarySetValue(allPausedTimers, key, pausedTimers);
+                [pausedTimers release];
+            }
+            
+            target->remainingTime = remainingTime;
+            [pausedTimers addObject:target];
+                    
+            [timer invalidate];
+            [timers removeObjectForKey:timerId];
+        }
     }
 }
 
@@ -211,7 +214,7 @@ void QObject::resumeTimers (const void *key, QObject *_target)
         [pausedTimers removeLastObject];
 
         maxId = MAX (maxId, target->timerId);
-                
+                        
         _addTimer (timer, target->timerId);
     }
     nextTimerID = maxId+1;

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list