Bug 73928

Summary: Put length in its own variable in KURL copyASCII
Product: WebKit Reporter: Benjamin Poulain <benjamin>
Component: WebKit Misc.Assignee: Benjamin Poulain <benjamin>
Status: RESOLVED FIXED    
Severity: Normal CC: darin
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Bug Depends on: 73794    
Bug Blocks:    
Attachments:
Description Flags
Patch darin: review+

Description Benjamin Poulain 2011-12-06 09:51:37 PST
Darin is concerned for (size_t i = 0; i < string.length(); i++) my cause performance problem due to string.length().
Comment 1 Benjamin Poulain 2011-12-06 09:57:12 PST
Created attachment 118063 [details]
Patch
Comment 2 Darin Adler 2011-12-06 10:13:55 PST
Comment on attachment 118063 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=118063&action=review

> Source/WebCore/platform/KURL.cpp:267
> +        const size_t length = string.length();

Please remove the const (or you could make src also const and build a bicycle shed).
Comment 3 Benjamin Poulain 2011-12-06 14:05:11 PST
Committed r102177: <http://trac.webkit.org/changeset/102177>