Changeset 216187 in webkit
- Timestamp:
- May 4, 2017 8:33:41 AM (7 years ago)
- Location:
- trunk
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/JavaScriptCore/API/JSStringRef.cpp
r185346 r216187 38 38 { 39 39 initializeThreading(); 40 return &OpaqueJSString::create( chars, numChars).leakRef();40 return &OpaqueJSString::create(reinterpret_cast<const UChar*>(chars), numChars).leakRef(); 41 41 } 42 42 … … 63 63 { 64 64 initializeThreading(); 65 return OpaqueJSString::create(StringImpl::createWithoutCopying( chars, numChars)).leakRef();65 return OpaqueJSString::create(StringImpl::createWithoutCopying(reinterpret_cast<const UChar*>(chars), numChars)).leakRef(); 66 66 } 67 67 … … 88 88 if (!string) 89 89 return nullptr; 90 return string->characters();90 return reinterpret_cast<const JSChar*>(string->characters()); 91 91 } 92 92 -
trunk/Source/JavaScriptCore/ChangeLog
r216180 r216187 1 2017-05-04 Konstantin Tokarev <annulen@yandex.ru> 2 3 Fix compilation with ICU 59.1 4 https://bugs.webkit.org/show_bug.cgi?id=171612 5 6 Reviewed by Mark Lam. 7 8 ICU 59.1 has broken source compatibility. Now it defines UChar as 9 char16_t, which does not allow automatic type conversion from unsigned 10 short in C++ code. 11 12 * API/JSStringRef.cpp: 13 (JSStringCreateWithCharacters): 14 (JSStringCreateWithCharactersNoCopy): 15 (JSStringGetCharactersPtr): 16 * runtime/DateConversion.cpp: 17 (JSC::formatDateTime): 18 1 19 2017-05-04 Saam Barati <sbarati@apple.com> 2 20 -
trunk/Source/JavaScriptCore/runtime/DateConversion.cpp
r205787 r216187 108 108 TIME_ZONE_INFORMATION timeZoneInformation; 109 109 GetTimeZoneInformation(&timeZoneInformation); 110 const WCHAR* timeZoneName = t.isDST() ? timeZoneInformation.DaylightName : timeZoneInformation.StandardName; 110 const WCHAR* winTimeZoneName = t.isDST() ? timeZoneInformation.DaylightName : timeZoneInformation.StandardName; 111 String timeZoneName(reinterpret_cast<const UChar*>(winTimeZoneName)); 111 112 #else 112 113 struct tm gtm = t; … … 116 117 if (timeZoneName[0]) { 117 118 builder.appendLiteral(" ("); 118 #if OS(WINDOWS)119 builder.append(String(timeZoneName));120 #else121 119 builder.append(timeZoneName); 122 #endif123 120 builder.append(')'); 124 121 } -
trunk/Source/WebKit2/ChangeLog
r216186 r216187 1 2017-05-04 Konstantin Tokarev <annulen@yandex.ru> 2 3 Fix compilation with ICU 59.1 4 https://bugs.webkit.org/show_bug.cgi?id=171612 5 6 Reviewed by Mark Lam. 7 8 ICU 59.1 has broken source compatibility. Now it defines UChar as 9 char16_t, which does not allow automatic type conversion from unsigned 10 short in C++ code. 11 12 * Shared/API/c/WKString.cpp: 13 (WKStringGetCharacters): 14 1 15 2017-05-04 Dan Bernstein <mitz@apple.com> 2 16 -
trunk/Source/WebKit2/Shared/API/c/WKString.cpp
r201863 r216187 62 62 auto substring = toImpl(stringRef)->stringView().substring(0, unsignedBufferLength); 63 63 64 substring.getCharactersWithUpconvert( static_cast<UChar*>(buffer));64 substring.getCharactersWithUpconvert(reinterpret_cast<UChar*>(buffer)); 65 65 return substring.length(); 66 66 } -
trunk/Tools/ChangeLog
r216185 r216187 1 2017-05-04 Konstantin Tokarev <annulen@yandex.ru> 2 3 Fix compilation with ICU 59.1 4 https://bugs.webkit.org/show_bug.cgi?id=171612 5 6 Reviewed by Mark Lam. 7 8 ICU 59.1 has broken source compatibility. Now it defines UChar as 9 char16_t, which does not allow automatic type conversion from unsigned 10 short in C++ code. 11 12 * TestRunnerShared/UIScriptContext/UIScriptContext.cpp: 13 (UIScriptContext::tryToCompleteUIScriptForCurrentParentCallback): 14 1 15 2017-05-04 Andy Estes <aestes@apple.com> 2 16 -
trunk/Tools/TestRunnerShared/UIScriptContext/UIScriptContext.cpp
r211674 r216187 172 172 173 173 JSStringRef result = m_uiScriptResultsPendingCompletion.take(m_currentScriptCallbackID); 174 String scriptResult( JSStringGetCharactersPtr(result), JSStringGetLength(result));174 String scriptResult(reinterpret_cast<const UChar*>(JSStringGetCharactersPtr(result)), JSStringGetLength(result)); 175 175 176 176 m_delegate.uiScriptDidComplete(scriptResult, m_currentScriptCallbackID);
Note: See TracChangeset
for help on using the changeset viewer.