Title: [114004] trunk/Source/WebCore
- Revision
- 114004
- Author
- [email protected]
- Date
- 2012-04-12 11:11:28 -0700 (Thu, 12 Apr 2012)
Log Message
REGRESSION (r113900): In nightly builds, Safari Webpage Preview Fetcher crashes in Settings::initializeDefaultFontFamilies() due to uncaught exception (sandbox preventing access to fonts plist)
https://bugs.webkit.org/show_bug.cgi?id=83792
<rdar://problem/11234002>
Reviewed by Dan Bernstein.
* page/mac/SettingsMac.mm: (WebCore::defaultFontFamilyDictionary): Bail out without setting
font preferences if the process doesn't have read access to WebCore.framework.
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (114003 => 114004)
--- trunk/Source/WebCore/ChangeLog 2012-04-12 18:10:52 UTC (rev 114003)
+++ trunk/Source/WebCore/ChangeLog 2012-04-12 18:11:28 UTC (rev 114004)
@@ -1,3 +1,14 @@
+2012-04-12 Alexey Proskuryakov <[email protected]>
+
+ REGRESSION (r113900): In nightly builds, Safari Webpage Preview Fetcher crashes in Settings::initializeDefaultFontFamilies() due to uncaught exception (sandbox preventing access to fonts plist)
+ https://bugs.webkit.org/show_bug.cgi?id=83792
+ <rdar://problem/11234002>
+
+ Reviewed by Dan Bernstein.
+
+ * page/mac/SettingsMac.mm: (WebCore::defaultFontFamilyDictionary): Bail out without setting
+ font preferences if the process doesn't have read access to WebCore.framework.
+
2012-04-12 Eli Fidler <[email protected]>
[BlackBerry] Set up default fonts for BlackBerry
Modified: trunk/Source/WebCore/page/mac/SettingsMac.mm (114003 => 114004)
--- trunk/Source/WebCore/page/mac/SettingsMac.mm 2012-04-12 18:10:52 UTC (rev 114003)
+++ trunk/Source/WebCore/page/mac/SettingsMac.mm 2012-04-12 18:11:28 UTC (rev 114004)
@@ -38,11 +38,18 @@
return fontFamilyDictionary;
NSBundle *bundle = [NSBundle bundleWithIdentifier:@"com.apple.WebCore"];
+#if BUILDING_ON_LION
+ // Temporary workaround for a Safari Webpage Preview Fetcher crash caused by insufficient sandbox permissions.
+ if (!bundle)
+ return 0;
+#endif
NSData *fileData = [NSData dataWithContentsOfURL:[bundle URLForResource:@"DefaultFonts" withExtension:@"plist"]];
+ if (!fileData)
+ FATAL("Could not read font fallback file");
NSError *error;
id propertyList = [NSPropertyListSerialization propertyListWithData:fileData options:NSPropertyListImmutable format:0 error:&error];
if (!propertyList)
- FATAL("Could not read font fallback file: %s", [[error description] UTF8String]);
+ FATAL("Could not parse font fallback property list: %s", [[error description] UTF8String]);
if (![propertyList isKindOfClass:[NSDictionary class]])
FATAL("Font fallback file has incorrect format - root object is not a dictionary");
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes