Changeset 109497 in webkit
- Timestamp:
- Mar 1, 2012 8:54:18 PM (12 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r109494 r109497 1 2012-03-01 Dan Bernstein <mitz@apple.com> 2 3 <rdar://problem/10942540> REGRESSION (r108956): Safari Webpage Preview Fetcher crashes in WebCore::localizedString() when using a WebKit nightly build 4 https://bugs.webkit.org/show_bug.cgi?id=80034 5 6 Reviewed by Benjamin Poulain. 7 8 Safari Webpage Preview Fetcher can’t access the WebCore framework when launched from a WebKit 9 nightly build. After r108956, this causes it to crash. 10 11 * platform/mac/LocalizedStringsMac.cpp: 12 (WebCore::localizedString): Added a null-check for the value returned from 13 CFBundleGetBundleWithIdentifier(CFSTR("com.apple.WebCore")). 14 1 15 2012-03-01 Jason Liu <jason.liu@torchmobile.com.cn> 2 16 -
trunk/Source/WebCore/platform/mac/LocalizedStringsMac.cpp
r108956 r109497 47 47 RetainPtr<CFStringRef> keyString(AdoptCF, CFStringCreateWithCStringNoCopy(0, key, kCFStringEncodingUTF8, kCFAllocatorNull)); 48 48 CFStringRef notFound = CFSTR("localized string not found"); 49 RetainPtr<CFStringRef> result(AdoptCF, CFBundleCopyLocalizedString(bundle, keyString.get(), notFound, 0)); 49 RetainPtr<CFStringRef> result; 50 if (bundle) { 51 result.adoptCF(CFBundleCopyLocalizedString(bundle, keyString.get(), notFound, 0)); 52 ASSERT_WITH_MESSAGE(result.get() != notFound, "could not find localizable string %s in bundle", key); 53 } else 54 result = notFound; 50 55 51 ASSERT_WITH_MESSAGE(result.get() != notFound, "could not find localizable string %s in bundle", key);52 56 return String(result.get()); 53 57 }
Note: See TracChangeset
for help on using the changeset viewer.