adium 3145:ce4a2a182037: Remove cookie handling from our message...

commits at adium.im commits at adium.im
Mon Mar 1 16:30:10 UTC 2010


details:	http://hg.adium.im/adium/rev/ce4a2a182037
revision:	3145:ce4a2a182037
author:		Stephen Holt <sholt at adium.im>
date:		Mon Mar 01 11:06:59 2010 -0500

Remove cookie handling from our message views.

This results in about a 10% savings in memory usage, according to ObjectAlloc, with about 5 IRC windows open.  YMMV.

diffs (31 lines):

diff -r 4392890e5247 -r ce4a2a182037 Plugins/WebKit Message View/AIWebKitDelegate.m
--- a/Plugins/WebKit Message View/AIWebKitDelegate.m	Sun Feb 28 18:47:10 2010 -0500
+++ b/Plugins/WebKit Message View/AIWebKitDelegate.m	Mon Mar 01 11:06:59 2010 -0500
@@ -49,6 +49,7 @@
 	[webView setUIDelegate:self];
 	[webView setDraggingDelegate:self];
 	[webView setEditingDelegate:self];
+	[webView setResourceLoadDelegate:self];
 	
 //	[[webView windowScriptObject] setValue:self forKey:@"client"];
 }
@@ -60,6 +61,8 @@
 	[webView setPolicyDelegate:nil];
 	[webView setUIDelegate:nil];
 	[webView setDraggingDelegate:nil];
+	[webView setEditingDelegate:nil];
+	[webView setResourceLoadDelegate:nil];
 	
 	[mapping removeObjectForKey:[NSValue valueWithPointer:webView]];
 }
@@ -209,4 +212,10 @@
 	return YES;
 }
 
+- (NSURLRequest *)webView:(WebView *)sender resource:(id)identifier willSendRequest:(NSURLRequest *)request redirectResponse:(NSURLResponse *)redirectResponse fromDataSource:(WebDataSource *)dataSource
+{
+	NSMutableURLRequest *newRequest = [request mutableCopy];
+	[newRequest setHTTPShouldHandleCookies:NO];
+	return [newRequest autorelease];
+}
 @end




More information about the commits mailing list