WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
138052
[Mac] Use modern loops in ResourceRequestCocoa.mm
https://bugs.webkit.org/show_bug.cgi?id=138052
Summary
[Mac] Use modern loops in ResourceRequestCocoa.mm
Chris Dumez
Reported
2014-10-24 11:57:24 PDT
Use modern loops in ResourceRequestCocoa.mm and leverage Objective-C's fast enumeration.
Attachments
Patch
(5.75 KB, patch)
2014-10-24 12:23 PDT
,
Chris Dumez
no flags
Details
Formatted Diff
Diff
Patch
(5.65 KB, patch)
2014-10-24 14:27 PDT
,
Chris Dumez
no flags
Details
Formatted Diff
Diff
Show Obsolete
(1)
View All
Add attachment
proposed patch, testcase, etc.
Chris Dumez
Comment 1
2014-10-24 12:23:28 PDT
Created
attachment 240424
[details]
Patch
WebKit Commit Bot
Comment 2
2014-10-24 12:24:54 PDT
Attachment 240424
[details]
did not pass style-queue: ERROR: Source/WebCore/platform/network/cocoa/ResourceRequestCocoa.mm:88: Place brace on its own line for function definitions. [whitespace/braces] [4] Total errors found: 1 in 2 files If any of these errors are false positives, please file a bug against check-webkit-style.
Darin Adler
Comment 3
2014-10-24 14:19:39 PDT
Comment on
attachment 240424
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=240424&action=review
> Source/WebCore/platform/network/cocoa/ResourceRequestCocoa.mm:88 > + [[m_nsRequest.get() allHTTPHeaderFields] enumerateKeysAndObjectsUsingBlock: ^(NSString *name, NSString *value, BOOL *) {
You don’t need the .get() here.
> Source/WebCore/platform/network/cocoa/ResourceRequestCocoa.mm:95 > + for (NSNumber *encodingFallback in [m_nsRequest.get() contentDispositionEncodingFallbackArray]) {
You don’t need the .get() here.
> Source/WebCore/platform/network/cocoa/ResourceRequestCocoa.mm:172 > + RetainPtr<CFStringRef> cfEncodingName = encodingName.createCFString(); > + CFStringEncoding nsEncoding = CFStringConvertEncodingToNSStringEncoding(CFStringConvertIANACharSetNameToEncoding(cfEncodingName.get()));
Reads fine without the local variable. Just encodingName.createCFString().get().
Chris Dumez
Comment 4
2014-10-24 14:27:29 PDT
Created
attachment 240436
[details]
Patch
WebKit Commit Bot
Comment 5
2014-10-24 14:29:45 PDT
Attachment 240436
[details]
did not pass style-queue: ERROR: Source/WebCore/platform/network/cocoa/ResourceRequestCocoa.mm:88: Place brace on its own line for function definitions. [whitespace/braces] [4] Total errors found: 1 in 2 files If any of these errors are false positives, please file a bug against check-webkit-style.
WebKit Commit Bot
Comment 6
2014-10-24 15:24:28 PDT
Comment on
attachment 240436
[details]
Patch Clearing flags on attachment: 240436 Committed
r175186
: <
http://trac.webkit.org/changeset/175186
>
WebKit Commit Bot
Comment 7
2014-10-24 15:24:32 PDT
All reviewed patches have been landed. Closing bug.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug