2006-10-21 Anders Carlsson <acarlsson@apple.com>
authorandersca <andersca@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sun, 22 Oct 2006 02:38:38 +0000 (02:38 +0000)
committerandersca <andersca@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sun, 22 Oct 2006 02:38:38 +0000 (02:38 +0000)
        Reviewed by Darin.

        * loader/mac/LoaderFunctionsMac.mm:
        (WebCore::ServeSynchronousRequest):
        * platform/mac/ResourceLoaderMac.mm:
        (WebCore::ResourceLoader::start):
        Don't leak the header dictionary.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@17201 268f45cc-cd09-0410-ab3c-d52691b4dbfc

WebCore/ChangeLog
WebCore/loader/mac/LoaderFunctionsMac.mm
WebCore/platform/mac/ResourceLoaderMac.mm

index 7713319b832b5d308eefc9209b9d3180737bf031..bca6d00282d9c08e472966b17aca326c34eb3729 100644 (file)
@@ -1,3 +1,13 @@
+2006-10-21  Anders Carlsson  <acarlsson@apple.com>
+
+        Reviewed by Darin.
+
+        * loader/mac/LoaderFunctionsMac.mm:
+        (WebCore::ServeSynchronousRequest):
+        * platform/mac/ResourceLoaderMac.mm:
+        (WebCore::ResourceLoader::start):
+        Don't leak the header dictionary.
+
 2006-10-21  Darin Adler  <darin@apple.com>
 
         Reviewed by Adam.
index f39767f2d3abe46040d32263673518590d2ea9d3..95968b56bfbee854c4f3dc4604164e6ebfd98041 100644 (file)
@@ -103,7 +103,7 @@ Vector<char> ServeSynchronousRequest(Loader *loader, DocLoader *docLoader, Resou
     const HashMap<String, String>& requestHeaders = job->requestHeaders();
 
     if (!requestHeaders.isEmpty())
-        headerDict = [[NSDictionary _webcore_dictionaryWithHeaderMap:requestHeaders] retain];
+        headerDict = [NSDictionary _webcore_dictionaryWithHeaderMap:requestHeaders];
     
     NSArray *postData = nil;
     if (!job->postData().elements().isEmpty())
@@ -113,7 +113,6 @@ Vector<char> ServeSynchronousRequest(Loader *loader, DocLoader *docLoader, Resou
     NSDictionary *responseHeaderDict = nil;
     int statusCode = 0;
     NSData *resultData = [bridge syncLoadResourceWithMethod:job->method() URL:job->url().getNSURL() customHeaders:headerDict postData:postData finalURL:&finalNSURL responseHeaders:&responseHeaderDict statusCode:&statusCode];
-    [headerDict release];
     
     job->kill();
 
index 6388bf123345773b217dfc35e4c777bf99374ef1..dc55433e40ddafe54e0a4b10596cc8733b1d988e 100644 (file)
@@ -81,7 +81,7 @@ bool ResourceLoader::start(DocLoader* docLoader)
     NSDictionary* headerDict = nil;
     
     if (!d->m_requestHeaders.isEmpty())
-        headerDict = [[NSDictionary _webcore_dictionaryWithHeaderMap:d->m_requestHeaders] retain];
+        headerDict = [NSDictionary _webcore_dictionaryWithHeaderMap:d->m_requestHeaders];
 
     if (!postData().elements().isEmpty())
         handle = [bridge startLoadingResource:resourceLoader withMethod:method() URL:url().getNSURL() customHeaders:headerDict postData:arrayFromFormData(postData())];