Title: [123541] trunk/Source/WebCore
- Revision
- 123541
- Author
- z...@google.com
- Date
- 2012-07-24 15:33:14 -0700 (Tue, 24 Jul 2012)
Log Message
Unreviewed, rolling out r123504.
http://trac.webkit.org/changeset/123504
https://bugs.webkit.org/show_bug.cgi?id=92169
broke a bunch of text-related tests in chromium mac debug
(Requested by zhenyao on #webkit).
Patch by Sheriff Bot <webkit.review....@gmail.com> on 2012-07-24
* platform/text/cf/StringCF.cpp:
(WTF::String::createCFString):
* platform/text/cf/StringImplCF.cpp:
(WTF::StringImpl::createCFString):
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (123540 => 123541)
--- trunk/Source/WebCore/ChangeLog 2012-07-24 22:26:34 UTC (rev 123540)
+++ trunk/Source/WebCore/ChangeLog 2012-07-24 22:33:14 UTC (rev 123541)
@@ -1,3 +1,17 @@
+2012-07-24 Sheriff Bot <webkit.review....@gmail.com>
+
+ Unreviewed, rolling out r123504.
+ http://trac.webkit.org/changeset/123504
+ https://bugs.webkit.org/show_bug.cgi?id=92169
+
+ broke a bunch of text-related tests in chromium mac debug
+ (Requested by zhenyao on #webkit).
+
+ * platform/text/cf/StringCF.cpp:
+ (WTF::String::createCFString):
+ * platform/text/cf/StringImplCF.cpp:
+ (WTF::StringImpl::createCFString):
+
2012-07-24 Kwang Yul Seo <sk...@company100.net>
Ensure Noah's ark without reading the DOM tree.
Modified: trunk/Source/WebCore/platform/text/cf/StringCF.cpp (123540 => 123541)
--- trunk/Source/WebCore/platform/text/cf/StringCF.cpp 2012-07-24 22:26:34 UTC (rev 123540)
+++ trunk/Source/WebCore/platform/text/cf/StringCF.cpp 2012-07-24 22:33:14 UTC (rev 123541)
@@ -45,7 +45,7 @@
CFStringRef String::createCFString() const
{
if (!m_impl)
- return CFSTR("");
+ return static_cast<CFStringRef>(CFRetain(CFSTR("")));
return m_impl->createCFString();
}
Modified: trunk/Source/WebCore/platform/text/cf/StringImplCF.cpp (123540 => 123541)
--- trunk/Source/WebCore/platform/text/cf/StringImplCF.cpp 2012-07-24 22:26:34 UTC (rev 123540)
+++ trunk/Source/WebCore/platform/text/cf/StringImplCF.cpp 2012-07-24 22:33:14 UTC (rev 123541)
@@ -134,22 +134,15 @@
CFStringRef StringImpl::createCFString()
{
- if (!m_length || !isMainThread()) {
- if (is8Bit())
- return CFStringCreateWithBytes(0, reinterpret_cast<const UInt8*>(characters8()), m_length, kCFStringEncodingISOLatin1, false);
- return CFStringCreateWithCharacters(0, reinterpret_cast<const UniChar*>(characters16()), m_length);
- }
- CFAllocatorRef allocator = StringWrapperCFAllocator::allocator();
+ CFAllocatorRef allocator = (m_length && isMainThread()) ? StringWrapperCFAllocator::allocator() : 0;
+ if (!allocator)
+ return CFStringCreateWithCharacters(0, reinterpret_cast<const UniChar*>(characters()), m_length);
// Put pointer to the StringImpl in a global so the allocator can store it with the CFString.
ASSERT(!StringWrapperCFAllocator::currentString);
StringWrapperCFAllocator::currentString = this;
- CFStringRef string;
- if (is8Bit())
- string = CFStringCreateWithBytesNoCopy(allocator, reinterpret_cast<const UInt8*>(characters8()), m_length, kCFStringEncodingISOLatin1, false, kCFAllocatorNull);
- else
- string = CFStringCreateWithCharactersNoCopy(allocator, reinterpret_cast<const UniChar*>(characters16()), m_length, kCFAllocatorNull);
+ CFStringRef string = CFStringCreateWithCharactersNoCopy(allocator, reinterpret_cast<const UniChar*>(characters()), m_length, kCFAllocatorNull);
// The allocator cleared the global when it read it, but also clear it here just in case.
ASSERT(!StringWrapperCFAllocator::currentString);
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
http://lists.webkit.org/mailman/listinfo/webkit-changes