Title: [161997] trunk/Source/WebCore
- Revision
- 161997
- Author
- [email protected]
- Date
- 2014-01-14 12:59:26 -0800 (Tue, 14 Jan 2014)
Log Message
[iOS] Directly allocate NSMutableDictionary in QLPreviewConverterDictionary() and QLContentDictionary()
https://bugs.webkit.org/show_bug.cgi?id=126999
<rdar://problem/15810305>
Reviewed by Joseph Pecoraro.
Fixes an issue where we may crash when subsequently accessing WebCore::QLPreviewConverterDictionary()
or WebCore::QLContentDictionary(). Currently neither of these functions retain'ed the NSMutable dictionary
returned by [NSMutableDictionary dictionary]. Instead, we should allocate and initialize NSMutableDictionary
directly to ensure that the dictionary is retained.
* platform/network/ios/QuickLook.mm:
(QLPreviewConverterDictionary):
(QLContentDictionary):
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (161996 => 161997)
--- trunk/Source/WebCore/ChangeLog 2014-01-14 20:52:50 UTC (rev 161996)
+++ trunk/Source/WebCore/ChangeLog 2014-01-14 20:59:26 UTC (rev 161997)
@@ -1,3 +1,20 @@
+2014-01-14 Daniel Bates <[email protected]>
+
+ [iOS] Directly allocate NSMutableDictionary in QLPreviewConverterDictionary() and QLContentDictionary()
+ https://bugs.webkit.org/show_bug.cgi?id=126999
+ <rdar://problem/15810305>
+
+ Reviewed by Joseph Pecoraro.
+
+ Fixes an issue where we may crash when subsequently accessing WebCore::QLPreviewConverterDictionary()
+ or WebCore::QLContentDictionary(). Currently neither of these functions retain'ed the NSMutable dictionary
+ returned by [NSMutableDictionary dictionary]. Instead, we should allocate and initialize NSMutableDictionary
+ directly to ensure that the dictionary is retained.
+
+ * platform/network/ios/QuickLook.mm:
+ (QLPreviewConverterDictionary):
+ (QLContentDictionary):
+
2014-01-14 Brent Fulgham <[email protected]>
[WebGL] Invalid range checking in WebGLRenderingContext::validateTexFuncLevel
Modified: trunk/Source/WebCore/platform/network/ios/QuickLook.mm (161996 => 161997)
--- trunk/Source/WebCore/platform/network/ios/QuickLook.mm 2014-01-14 20:52:50 UTC (rev 161996)
+++ trunk/Source/WebCore/platform/network/ios/QuickLook.mm 2014-01-14 20:59:26 UTC (rev 161997)
@@ -138,13 +138,13 @@
static NSMutableDictionary *QLPreviewConverterDictionary()
{
- static NSMutableDictionary *dictionary = adoptNS([NSMutableDictionary dictionary]).leakRef();
+ static NSMutableDictionary *dictionary = [[NSMutableDictionary alloc] init];
return dictionary;
}
static NSMutableDictionary *QLContentDictionary()
{
- static NSMutableDictionary *contentDictionary = adoptNS([NSMutableDictionary dictionary]).leakRef();
+ static NSMutableDictionary *contentDictionary = [[NSMutableDictionary alloc] init];
return contentDictionary;
}
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes