Changeset 123541 in webkit
- Timestamp:
- Jul 24, 2012, 3:33:14 PM (13 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
TabularUnified trunk/Source/WebCore/ChangeLog ¶
r123537 r123541 1 2012-07-24 Sheriff Bot <webkit.review.bot@gmail.com> 2 3 Unreviewed, rolling out r123504. 4 http://trac.webkit.org/changeset/123504 5 https://bugs.webkit.org/show_bug.cgi?id=92169 6 7 broke a bunch of text-related tests in chromium mac debug 8 (Requested by zhenyao on #webkit). 9 10 * platform/text/cf/StringCF.cpp: 11 (WTF::String::createCFString): 12 * platform/text/cf/StringImplCF.cpp: 13 (WTF::StringImpl::createCFString): 14 1 15 2012-07-24 Kwang Yul Seo <skyul@company100.net> 2 16 -
TabularUnified trunk/Source/WebCore/platform/text/cf/StringCF.cpp ¶
r123504 r123541 46 46 { 47 47 if (!m_impl) 48 return CFSTR("");48 return static_cast<CFStringRef>(CFRetain(CFSTR(""))); 49 49 50 50 return m_impl->createCFString(); -
TabularUnified trunk/Source/WebCore/platform/text/cf/StringImplCF.cpp ¶
r123504 r123541 135 135 CFStringRef StringImpl::createCFString() 136 136 { 137 if (!m_length || !isMainThread()) { 138 if (is8Bit()) 139 return CFStringCreateWithBytes(0, reinterpret_cast<const UInt8*>(characters8()), m_length, kCFStringEncodingISOLatin1, false); 140 return CFStringCreateWithCharacters(0, reinterpret_cast<const UniChar*>(characters16()), m_length); 141 } 142 CFAllocatorRef allocator = StringWrapperCFAllocator::allocator(); 137 CFAllocatorRef allocator = (m_length && isMainThread()) ? StringWrapperCFAllocator::allocator() : 0; 138 if (!allocator) 139 return CFStringCreateWithCharacters(0, reinterpret_cast<const UniChar*>(characters()), m_length); 143 140 144 141 // Put pointer to the StringImpl in a global so the allocator can store it with the CFString. … … 146 143 StringWrapperCFAllocator::currentString = this; 147 144 148 CFStringRef string; 149 if (is8Bit()) 150 string = CFStringCreateWithBytesNoCopy(allocator, reinterpret_cast<const UInt8*>(characters8()), m_length, kCFStringEncodingISOLatin1, false, kCFAllocatorNull); 151 else 152 string = CFStringCreateWithCharactersNoCopy(allocator, reinterpret_cast<const UniChar*>(characters16()), m_length, kCFAllocatorNull); 145 CFStringRef string = CFStringCreateWithCharactersNoCopy(allocator, reinterpret_cast<const UniChar*>(characters()), m_length, kCFAllocatorNull); 153 146 154 147 // The allocator cleared the global when it read it, but also clear it here just in case.
Note:
See TracChangeset
for help on using the changeset viewer.