Reviewed by Darin.
- Use initWithUser instead of credentialWithUser because credentialWithUser leaks.
* platform/network/mac/AuthenticationMac.mm:
(WebCore::mac):
* platform/network/mac/ResourceHandleMac.mm:
(-[WebCoreResourceHandleAsDelegate connection:didReceiveAuthenticationChallenge:]):
(-[WebCoreSynchronousLoader connection:didReceiveAuthenticationChallenge:]):
WebKit:
Reviewed by Darin.
- Use initWithUser instead of credentialWithUser because credentialWithUser leaks.
* Panels/WebAuthenticationPanel.m:
(-[WebAuthenticationPanel runAsModalDialogWithChallenge:]):
(-[WebAuthenticationPanel sheetDidEnd:returnCode:contextInfo:]):
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@25223
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
+2007-08-24 Kevin McCullough <kmccullough@apple.com>
+
+ Reviewed by Darin.
+
+ - Use initWithUser instead of credentialWithUser because credentialWithUser leaks.
+
+ * platform/network/mac/AuthenticationMac.mm:
+ (WebCore::mac):
+ * platform/network/mac/ResourceHandleMac.mm:
+ (-[WebCoreResourceHandleAsDelegate connection:didReceiveAuthenticationChallenge:]):
+ (-[WebCoreSynchronousLoader connection:didReceiveAuthenticationChallenge:]):
+
2007-08-24 Jon Honeycutt <jhoneycutt@apple.com>
Reviewed by Darin.
default:
ASSERT_NOT_REACHED();
}
-
- return [NSURLCredential credentialWithUser:coreCredential.user()
- password:coreCredential.password()
- persistence:persistence];
+
+ return [[[NSURLCredential alloc] initWithUser:coreCredential.user()
+ password:coreCredential.password()
+ persistence:persistence]
+ autorelease];
}
AuthenticationChallenge core(NSURLAuthenticationChallenge *macChallenge)
NSString *password = [m_url password];
if (user && password) {
- NSURLCredential *credential = [NSURLCredential credentialWithUser:user
+ NSURLCredential *credential = [[NSURLCredential alloc] initWithUser:user
password:password
persistence:NSURLCredentialPersistenceForSession];
[[challenge sender] useCredential:credential forAuthenticationChallenge:challenge];
+ [credential release];
return;
}
}
NSString *password = [m_url password];
if (user && password) {
- NSURLCredential *credential = [NSURLCredential credentialWithUser:user
+ NSURLCredential *credential = [[NSURLCredential alloc] initWithUser:user
password:password
persistence:NSURLCredentialPersistenceForSession];
[[challenge sender] useCredential:credential forAuthenticationChallenge:challenge];
+ [credential release];
return;
}
}
+2007-08-24 Kevin McCullough <kmccullough@apple.com>
+
+ Reviewed by Darin.
+
+ - Use initWithUser instead of credentialWithUser because credentialWithUser leaks.
+
+ * Panels/WebAuthenticationPanel.m:
+ (-[WebAuthenticationPanel runAsModalDialogWithChallenge:]):
+ (-[WebAuthenticationPanel sheetDidEnd:returnCode:contextInfo:]):
+
2007-08-24 Adele Peterson <adele@apple.com>
Fix by Darin, reviewed by Adele.
NSURLCredential *credential = nil;
if ([[NSApplication sharedApplication] runModalForWindow:panel] == 0) {
- credential = [NSURLCredential credentialWithUser:[username stringValue] password:[password stringValue] persistence:([remember state] == NSOnState) ? NSURLCredentialPersistencePermanent : NSURLCredentialPersistenceForSession];
+ credential = [[NSURLCredential alloc] initWithUser:[username stringValue] password:[password stringValue] persistence:([remember state] == NSOnState) ? NSURLCredentialPersistencePermanent : NSURLCredentialPersistenceForSession];
}
[callback performSelector:selector withObject:chall withObject:credential];
+ [credential release];
}
- (void)runAsSheetOnWindow:(NSWindow *)window withChallenge:(NSURLAuthenticationChallenge *)chall
ASSERT(challenge != nil);
if (returnCode == 0) {
- credential = [NSURLCredential credentialWithUser:[username stringValue] password:[password stringValue] persistence:([remember state] == NSOnState) ? NSURLCredentialPersistencePermanent : NSURLCredentialPersistenceForSession];
+ credential = [[NSURLCredential alloc] initWithUser:[username stringValue] password:[password stringValue] persistence:([remember state] == NSOnState) ? NSURLCredentialPersistencePermanent : NSURLCredentialPersistenceForSession];
}
// We take this tricky approach to nilling out and releasing the challenge
chall = challenge;
challenge = nil;
[callback performSelector:selector withObject:chall withObject:credential];
+ [credential release];
[chall release];
}