WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
118736
Fix some NSDictionary misuse pointed out by the clang static analyzer
https://bugs.webkit.org/show_bug.cgi?id=118736
Summary
Fix some NSDictionary misuse pointed out by the clang static analyzer
Jessie Berlin
Reported
2013-07-16 09:16:50 PDT
When I run the clang static analyzer against ToT (152721), it points out some places where WebKit and WebKit2 are misusing NSDictionary. We should fix that.
Attachments
Patch
(5.56 KB, patch)
2013-07-16 09:52 PDT
,
Jessie Berlin
no flags
Details
Formatted Diff
Diff
View All
Add attachment
proposed patch, testcase, etc.
Jessie Berlin
Comment 1
2013-07-16 09:52:01 PDT
Created
attachment 206791
[details]
Patch
Anders Carlsson
Comment 2
2013-07-16 10:20:33 PDT
Comment on
attachment 206791
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=206791&action=review
> Source/WebKit/mac/WebCoreSupport/WebEditorClient.mm:380 > NSDictionary *dictionary = [[NSDictionary alloc] initWithObjectsAndKeys: excludedElements, NSExcludedElementsDocumentAttribute,
Seems like this can just use dictionaryWithObject:forKey:
> Source/WebKit2/WebProcess/WebCoreSupport/mac/WebEditorClientMac.mm:114 > - NSExcludedElementsDocumentAttribute, nil, @"WebResourceHandler", nil]; > + NSExcludedElementsDocumentAttribute, nil];
Ditto.
Jessie Berlin
Comment 3
2013-07-16 10:49:24 PDT
(In reply to
comment #2
)
> (From update of
attachment 206791
[details]
) > View in context:
https://bugs.webkit.org/attachment.cgi?id=206791&action=review
> > > Source/WebKit/mac/WebCoreSupport/WebEditorClient.mm:380 > > NSDictionary *dictionary = [[NSDictionary alloc] initWithObjectsAndKeys: excludedElements, NSExcludedElementsDocumentAttribute, > > Seems like this can just use dictionaryWithObject:forKey:
Heh, yes. Done.
> > > Source/WebKit2/WebProcess/WebCoreSupport/mac/WebEditorClientMac.mm:114 > > - NSExcludedElementsDocumentAttribute, nil, @"WebResourceHandler", nil]; > > + NSExcludedElementsDocumentAttribute, nil]; > > Ditto.
Done. Thanks for the review!
Jessie Berlin
Comment 4
2013-07-16 11:03:33 PDT
Comment on
attachment 206791
[details]
Patch Committed in
http://trac.webkit.org/changeset/152730
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