Bug 118519 - Remove some dead code from WebNSURLExtras _web_hostString
Summary: Remove some dead code from WebNSURLExtras _web_hostString
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKit Misc. (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Jessie Berlin
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-07-09 15:59 PDT by Jessie Berlin
Modified: 2013-07-10 08:54 PDT (History)
2 users (show)

See Also:


Attachments
Patch (1.23 KB, patch)
2013-07-09 16:04 PDT, Jessie Berlin
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Jessie Berlin 2013-07-09 15:59:00 PDT
- (NSString *)_web_hostString
{
    NSData *data = [self _web_hostData];
    if (!data) {
        data = [NSData data];
    }
    return [[[NSString alloc] initWithData:[self _web_hostData] encoding:NSUTF8StringEncoding] autorelease];
}

data isn’t ever used and initWithData:encoding does not throw an exception when data is nil, so we should just remove data.
Comment 1 Jessie Berlin 2013-07-09 16:04:22 PDT
Created attachment 206356 [details]
Patch
Comment 2 Jessie Berlin 2013-07-10 08:54:22 PDT
Comment on attachment 206356 [details]
Patch

Committed in http://trac.webkit.org/changeset/152536