Ignore:
Timestamp:
May 4, 2017, 8:33:41 AM (8 years ago)
Author:
Konstantin Tokarev
Message:

Fix compilation with ICU 59.1
https://bugs.webkit.org/show_bug.cgi?id=171612

Reviewed by Mark Lam.

ICU 59.1 has broken source compatibility. Now it defines UChar as
char16_t, which does not allow automatic type conversion from unsigned
short in C++ code.

Source/JavaScriptCore:

  • API/JSStringRef.cpp:

(JSStringCreateWithCharacters):
(JSStringCreateWithCharactersNoCopy):
(JSStringGetCharactersPtr):

  • runtime/DateConversion.cpp:

(JSC::formatDateTime):

Source/WebKit2:

  • Shared/API/c/WKString.cpp:

(WKStringGetCharacters):

Tools:

  • TestRunnerShared/UIScriptContext/UIScriptContext.cpp:

(UIScriptContext::tryToCompleteUIScriptForCurrentParentCallback):

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/JavaScriptCore/runtime/DateConversion.cpp

    r205787 r216187  
    108108            TIME_ZONE_INFORMATION timeZoneInformation;
    109109            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));
    111112#else
    112113            struct tm gtm = t;
     
    116117            if (timeZoneName[0]) {
    117118                builder.appendLiteral(" (");
    118 #if OS(WINDOWS)
    119                 builder.append(String(timeZoneName));
    120 #else
    121119                builder.append(timeZoneName);
    122 #endif
    123120                builder.append(')');
    124121            }
Note: See TracChangeset for help on using the changeset viewer.