Skip to content
Permalink
Browse files
Reviewed by Timothy Hatcher.
Stop using -[NSString initWithContentsOfFile:]
https://bugs.webkit.org/show_bug.cgi?id=58763

-[NSString initWithContentsOfFile:] was deprecated in 10.4, so we should stop using it.

* WebView/WebView.mm:
(leakMailQuirksUserScriptContents):
(leakOutlookQuirksUserScriptContents):


Canonical link: https://commits.webkit.org/73931@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@84191 268f45cc-cd09-0410-ab3c-d52691b4dbfc
  • Loading branch information
Cameron Zwarich committed Apr 18, 2011
1 parent 42deb6e commit f95848077603b02ef613b2efaa39eb83350810ab
Showing 2 changed files with 17 additions and 2 deletions.
@@ -1,3 +1,16 @@
2011-04-17 Cameron Zwarich <zwarich@apple.com>

Reviewed by Timothy Hatcher.

Stop using -[NSString initWithContentsOfFile:]
https://bugs.webkit.org/show_bug.cgi?id=58763

-[NSString initWithContentsOfFile:] was deprecated in 10.4, so we should stop using it.

* WebView/WebView.mm:
(leakMailQuirksUserScriptContents):
(leakOutlookQuirksUserScriptContents):

2011-04-17 David Kilzer <ddkilzer@apple.com>

<http://webkit.org/b/58463> Switch HTTP pipelining from user default to private setting
@@ -643,7 +643,8 @@ - (BOOL)_usesDocumentViews
static NSString *leakMailQuirksUserScriptContents()
{
NSString *scriptPath = [[NSBundle bundleForClass:[WebView class]] pathForResource:@"MailQuirksUserScript" ofType:@"js"];
return [[NSString alloc] initWithContentsOfFile:scriptPath];
NSStringEncoding encoding;
return [[NSString alloc] initWithContentsOfFile:scriptPath usedEncoding:&encoding error:0];
}

- (void)_injectMailQuirksScript
@@ -663,7 +664,8 @@ static bool needsOutlookQuirksScript()
static NSString *leakOutlookQuirksUserScriptContents()
{
NSString *scriptPath = [[NSBundle bundleForClass:[WebView class]] pathForResource:@"OutlookQuirksUserScript" ofType:@"js"];
return [[NSString alloc] initWithContentsOfFile:scriptPath];
NSStringEncoding encoding;
return [[NSString alloc] initWithContentsOfFile:scriptPath usedEncoding:&encoding error:0];
}

-(void)_injectOutlookQuirksScript

0 comments on commit f958480

Please sign in to comment.