Title: [109497] trunk/Source/WebCore
- Revision
- 109497
- Author
- [email protected]
- Date
- 2012-03-01 20:54:18 -0800 (Thu, 01 Mar 2012)
Log Message
<rdar://problem/10942540> REGRESSION (r108956): Safari Webpage Preview Fetcher crashes in WebCore::localizedString() when using a WebKit nightly build
https://bugs.webkit.org/show_bug.cgi?id=80034
Reviewed by Benjamin Poulain.
Safari Webpage Preview Fetcher can’t access the WebCore framework when launched from a WebKit
nightly build. After r108956, this causes it to crash.
* platform/mac/LocalizedStringsMac.cpp:
(WebCore::localizedString): Added a null-check for the value returned from
CFBundleGetBundleWithIdentifier(CFSTR("com.apple.WebCore")).
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (109496 => 109497)
--- trunk/Source/WebCore/ChangeLog 2012-03-02 04:49:30 UTC (rev 109496)
+++ trunk/Source/WebCore/ChangeLog 2012-03-02 04:54:18 UTC (rev 109497)
@@ -1,3 +1,17 @@
+2012-03-01 Dan Bernstein <[email protected]>
+
+ <rdar://problem/10942540> REGRESSION (r108956): Safari Webpage Preview Fetcher crashes in WebCore::localizedString() when using a WebKit nightly build
+ https://bugs.webkit.org/show_bug.cgi?id=80034
+
+ Reviewed by Benjamin Poulain.
+
+ Safari Webpage Preview Fetcher can’t access the WebCore framework when launched from a WebKit
+ nightly build. After r108956, this causes it to crash.
+
+ * platform/mac/LocalizedStringsMac.cpp:
+ (WebCore::localizedString): Added a null-check for the value returned from
+ CFBundleGetBundleWithIdentifier(CFSTR("com.apple.WebCore")).
+
2012-03-01 Jason Liu <[email protected]>
[BlackBerry]Array of Cookies in HTTP request header are not in order.
Modified: trunk/Source/WebCore/platform/mac/LocalizedStringsMac.cpp (109496 => 109497)
--- trunk/Source/WebCore/platform/mac/LocalizedStringsMac.cpp 2012-03-02 04:49:30 UTC (rev 109496)
+++ trunk/Source/WebCore/platform/mac/LocalizedStringsMac.cpp 2012-03-02 04:54:18 UTC (rev 109497)
@@ -46,9 +46,13 @@
RetainPtr<CFStringRef> keyString(AdoptCF, CFStringCreateWithCStringNoCopy(0, key, kCFStringEncodingUTF8, kCFAllocatorNull));
CFStringRef notFound = CFSTR("localized string not found");
- RetainPtr<CFStringRef> result(AdoptCF, CFBundleCopyLocalizedString(bundle, keyString.get(), notFound, 0));
+ RetainPtr<CFStringRef> result;
+ if (bundle) {
+ result.adoptCF(CFBundleCopyLocalizedString(bundle, keyString.get(), notFound, 0));
+ ASSERT_WITH_MESSAGE(result.get() != notFound, "could not find localizable string %s in bundle", key);
+ } else
+ result = notFound;
- ASSERT_WITH_MESSAGE(result.get() != notFound, "could not find localizable string %s in bundle", key);
return String(result.get());
}
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes