Ignore:
Timestamp:
Jun 4, 2017, 9:38:39 AM (8 years ago)
Author:
Konstantin Tokarev
Message:

Fix build of Windows-specific code with ICU 59.1
https://bugs.webkit.org/show_bug.cgi?id=172729

Reviewed by Darin Adler.

Source/JavaScriptCore:

Fix conversions from WTF::String to wchar_t* and vice versa.

  • jsc.cpp:

(currentWorkingDirectory):
(fetchModuleFromLocalFileSystem):

  • runtime/DateConversion.cpp:

(JSC::formatDateTime):

Source/WebCore:

Fix conversions from WTF::String to wchar_t* and vice versa.
No new tests needed.

  • platform/graphics/win/MediaPlayerPrivateMediaFoundation.cpp:

(WebCore::mimeTypeCache):
(WebCore::MediaPlayerPrivateMediaFoundation::startCreateMediaSource):

Source/WebKit/win:

Fix conversions from WTF::String to wchar_t* and vice versa.

  • Plugins/PluginDatabaseWin.cpp:

(WebCore::addPluginPathsFromRegistry):
(WebCore::PluginDatabase::getPluginPathsInDirectories):
(WebCore::addMozillaPluginDirectories):
(WebCore::addWindowsMediaPlayerPluginDirectory):
(WebCore::addAdobeAcrobatPluginDirectory):
(WebCore::addJavaPluginDirectory):
(WebCore::safariPluginsDirectory):
(WebCore::addMacromediaPluginDirectories):

  • Plugins/PluginPackageWin.cpp:

(WebCore::getVersionInfo):
(WebCore::PluginPackage::fetchInfo):
(WebCore::PluginPackage::load):

  • Plugins/PluginViewWin.cpp:

(WebCore::PluginView::handlePostReadFile):

Source/WTF:

  • wtf/text/win/WCharStringExtras.h: Added new header file wuth helper

functions for conversion between WTF::String and wchart_t*.
(WTF::stringToNullTerminatedWChar):
(WTF::wcharToString):
(WTF::nullTerminatedWCharToString):

File:
1 edited

Legend:

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

    r216187 r217771  
    3333#if OS(WINDOWS)
    3434#include <windows.h>
     35#include <wtf/text/win/WCharStringExtras.h>
    3536#endif
    3637
     
    109110            GetTimeZoneInformation(&timeZoneInformation);
    110111            const WCHAR* winTimeZoneName = t.isDST() ? timeZoneInformation.DaylightName : timeZoneInformation.StandardName;
    111             String timeZoneName(reinterpret_cast<const UChar*>(winTimeZoneName));
     112            String timeZoneName = nullTerminatedWCharToString(winTimeZoneName);
    112113#else
    113114            struct tm gtm = t;
Note: See TracChangeset for help on using the changeset viewer.