Title: [152730] trunk/Source
- Revision
- 152730
- Author
- [email protected]
- Date
- 2013-07-16 11:04:15 -0700 (Tue, 16 Jul 2013)
Log Message
Fix some NSDictionary misuse pointed out by the clang static analyzer
https://bugs.webkit.org/show_bug.cgi?id=118736
Reviewed by Anders Carlsson.
Source/WebKit/mac:
* Plugins/Hosted/NetscapePluginHostManager.mm:
(WebKit::NetscapePluginHostManager::spawnPluginHost):
Explicitly cast the CFStringRef to an NSString *.
* WebCoreSupport/WebEditorClient.mm:
(WebEditorClient::documentFragmentFromAttributedString):
Do not put a key with a nil value pair into the NSDictionary.
Source/WebKit2:
* WebProcess/WebCoreSupport/mac/WebEditorClientMac.mm:
(WebKit::WebEditorClient::documentFragmentFromAttributedString):
Do not put a key with a nil value pair into the NSDictionary.
Modified Paths
Diff
Modified: trunk/Source/WebKit/mac/ChangeLog (152729 => 152730)
--- trunk/Source/WebKit/mac/ChangeLog 2013-07-16 16:51:54 UTC (rev 152729)
+++ trunk/Source/WebKit/mac/ChangeLog 2013-07-16 18:04:15 UTC (rev 152730)
@@ -1,3 +1,17 @@
+2013-07-16 Jessie Berlin <[email protected]>
+
+ Fix some NSDictionary misuse pointed out by the clang static analyzer
+ https://bugs.webkit.org/show_bug.cgi?id=118736
+
+ Reviewed by Anders Carlsson.
+
+ * Plugins/Hosted/NetscapePluginHostManager.mm:
+ (WebKit::NetscapePluginHostManager::spawnPluginHost):
+ Explicitly cast the CFStringRef to an NSString *.
+ * WebCoreSupport/WebEditorClient.mm:
+ (WebEditorClient::documentFragmentFromAttributedString):
+ Do not put a key with a nil value pair into the NSDictionary.
+
2013-07-15 Tim Horton <[email protected]>
Update blocked/missing plug-in UI
Modified: trunk/Source/WebKit/mac/Plugins/Hosted/NetscapePluginHostManager.mm (152729 => 152730)
--- trunk/Source/WebKit/mac/Plugins/Hosted/NetscapePluginHostManager.mm 2013-07-16 16:51:54 UTC (rev 152729)
+++ trunk/Source/WebKit/mac/Plugins/Hosted/NetscapePluginHostManager.mm 2013-07-16 18:04:15 UTC (rev 152730)
@@ -118,7 +118,7 @@
NSDictionary *launchProperties = [[NSDictionary alloc] initWithObjectsAndKeys:
pluginHostAppExecutablePath, @"pluginHostPath",
[NSNumber numberWithInt:pluginArchitecture], @"cpuType",
- localization.get(), @"localization",
+ (NSString *)localization.get(), @"localization",
nil];
NSData *data = "" dataFromPropertyList:launchProperties format:NSPropertyListBinaryFormat_v1_0 errorDescription:0];
Modified: trunk/Source/WebKit/mac/WebCoreSupport/WebEditorClient.mm (152729 => 152730)
--- trunk/Source/WebKit/mac/WebCoreSupport/WebEditorClient.mm 2013-07-16 16:51:54 UTC (rev 152729)
+++ trunk/Source/WebKit/mac/WebCoreSupport/WebEditorClient.mm 2013-07-16 18:04:15 UTC (rev 152730)
@@ -377,9 +377,8 @@
{
static NSArray *excludedElements = createExcludedElementsForAttributedStringConversion();
- NSDictionary *dictionary = [[NSDictionary alloc] initWithObjectsAndKeys: excludedElements, NSExcludedElementsDocumentAttribute,
- nil, @"WebResourceHandler", nil];
-
+ NSDictionary *dictionary = [NSDictionary dictionaryWithObject:excludedElements forKey:NSExcludedElementsDocumentAttribute];
+
NSArray *subResources;
DOMDocumentFragment* fragment = [string _documentFromRange:NSMakeRange(0, [string length])
document:[[m_webView mainFrame] DOMDocument]
@@ -387,8 +386,7 @@
subresources:&subResources];
for (WebResource* resource in subResources)
resources.append([resource _coreResource]);
-
- [dictionary release];
+
return core(fragment);
}
Modified: trunk/Source/WebKit2/ChangeLog (152729 => 152730)
--- trunk/Source/WebKit2/ChangeLog 2013-07-16 16:51:54 UTC (rev 152729)
+++ trunk/Source/WebKit2/ChangeLog 2013-07-16 18:04:15 UTC (rev 152730)
@@ -1,3 +1,14 @@
+2013-07-16 Jessie Berlin <[email protected]>
+
+ Fix some NSDictionary misuse pointed out by the clang static analyzer
+ https://bugs.webkit.org/show_bug.cgi?id=118736
+
+ Reviewed by Anders Carlsson.
+
+ * WebProcess/WebCoreSupport/mac/WebEditorClientMac.mm:
+ (WebKit::WebEditorClient::documentFragmentFromAttributedString):
+ Do not put a key with a nil value pair into the NSDictionary.
+
2013-07-16 Michael BrĂ¼ning <[email protected]>
[Qt] Replace Nokia with Qt Project in service name.
Modified: trunk/Source/WebKit2/WebProcess/WebCoreSupport/mac/WebEditorClientMac.mm (152729 => 152730)
--- trunk/Source/WebKit2/WebProcess/WebCoreSupport/mac/WebEditorClientMac.mm 2013-07-16 16:51:54 UTC (rev 152729)
+++ trunk/Source/WebKit2/WebProcess/WebCoreSupport/mac/WebEditorClientMac.mm 2013-07-16 18:04:15 UTC (rev 152730)
@@ -110,8 +110,7 @@
{
static NSArray *excludedElements = createExcludedElementsForAttributedStringConversion();
- NSDictionary *dictionary = [[NSDictionary alloc] initWithObjectsAndKeys: excludedElements,
- NSExcludedElementsDocumentAttribute, nil, @"WebResourceHandler", nil];
+ NSDictionary *dictionary = [NSDictionary dictionaryWithObject:excludedElements forKey:NSExcludedElementsDocumentAttribute];
NSArray *subResources;
Document* document = m_page->mainFrame() ? m_page->mainFrame()->document() : 0;
@@ -121,8 +120,7 @@
subresources:&subResources];
for (WebResource* resource in subResources)
resources.append([resource _coreResource]);
-
- [dictionary release];
+
return core(fragment);
}
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes