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

kocienda kocienda at 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Sat Sep 26 06:14:50 UTC 2009


The following commit has been merged in the debian/unstable branch:
commit f5509387eb875e728c8f64ce2e0463b777e4441f
Author: kocienda <kocienda at 268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Thu May 23 22:23:45 2002 +0000

    2002-05-23  Kenneth Kocienda  <kocienda at apple.com>
    
            Reviewed by: Maciej Stachowiak
    
            Fix for this bug:
    
            Radar 2935882 (IFURLFileReader class has unbalanaced release count on an NSData ivar)
    
            IFURLFileReader can create an ivar that points to a data using an method that
            returns an autoreleased object. Then, without retaining the data anywhere
            internally, it releases the data in its dealloc method.
    
            This has been fixed. Now the retain/release count is guaranteed to be balanced
    
            * Database.subproj/IFURLFileDatabase.m:
            (-[IFURLFileReader initWithPath:])
    
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@1210 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/WebKit/Misc.subproj/WebFileDatabase.m b/WebKit/Misc.subproj/WebFileDatabase.m
index 3bdd1de..22e9917 100644
--- a/WebKit/Misc.subproj/WebFileDatabase.m
+++ b/WebKit/Misc.subproj/WebFileDatabase.m
@@ -95,7 +95,7 @@ static void URLFileReaderInit(void)
     [mutex unlock];
 
     if (fileNotMappable) {
-        data = [NSData dataWithContentsOfFile:path];
+        data = [[NSData alloc] initWithContentsOfFile:path];
     }
     else if (fileSystemPath && (fd = open(fileSystemPath, O_RDONLY, 0)) >= 0) {
         // File exists. Retrieve the file size.
@@ -111,7 +111,7 @@ static void URLFileReaderInit(void)
                 [mutex unlock];
                 
                 mappedBytes = NULL;
-                data = [NSData dataWithContentsOfFile:path];
+                data = [[NSData alloc] initWithContentsOfFile:path];
             }
             else {
                 // On success, create data object using mapped bytes.
@@ -121,7 +121,7 @@ static void URLFileReaderInit(void)
                 // be stubborn....try to read bytes again
                 if (!data) {
                     munmap(mappedBytes, mappedLength);    
-                    data = [NSData dataWithContentsOfFile:path];
+                    data = [[NSData alloc] initWithContentsOfFile:path];
                 }
             }
         }

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list