Changeset 234989 in webkit


Ignore:
Timestamp:
Aug 17, 2018 11:09:39 AM (6 years ago)
Author:
achristensen@apple.com
Message:

Fix API tests after r234985
https://bugs.webkit.org/show_bug.cgi?id=188679

  • UIProcess/API/C/WKPage.cpp:

(encodingOf):
(dataFrom):
The encoding of null strings had changed, which is no big deal because there's no data in that encoding,
but switching it back fixes the tests.

Location:
trunk/Source/WebKit
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebKit/ChangeLog

    r234985 r234989  
     12018-08-17  Alex Christensen  <achristensen@webkit.org>
     2
     3        Fix API tests after r234985
     4        https://bugs.webkit.org/show_bug.cgi?id=188679
     5
     6        * UIProcess/API/C/WKPage.cpp:
     7        (encodingOf):
     8        (dataFrom):
     9        The encoding of null strings had changed, which is no big deal because there's no data in that encoding,
     10        but switching it back fixes the tests.
     11
    1122018-08-17  Alex Christensen  <achristensen@webkit.org>
    213
  • trunk/Source/WebKit/UIProcess/API/C/WKPage.cpp

    r234985 r234989  
    202202static String encodingOf(const String& string)
    203203{
    204     if (string.isNull() || string.is8Bit())
    205         "latin1"_s;
    206     return "utf-16"_s;
     204    if (string.isNull() || !string.is8Bit())
     205        "utf-16"_s;
     206    return "latin1"_s;
    207207}
    208208
    209209static IPC::DataReference dataFrom(const String& string)
    210210{
    211     if (string.isNull() || string.is8Bit())
    212         return { reinterpret_cast<const uint8_t*>(string.characters8()), string.length() * sizeof(LChar) };
    213     return { reinterpret_cast<const uint8_t*>(string.characters16()), string.length() * sizeof(UChar) };
     211    if (string.isNull() || !string.is8Bit())
     212        return { reinterpret_cast<const uint8_t*>(string.characters16()), string.length() * sizeof(UChar) };
     213    return { reinterpret_cast<const uint8_t*>(string.characters8()), string.length() * sizeof(LChar) };
    214214}
    215215
Note: See TracChangeset for help on using the changeset viewer.