| Index: third_party/WebKit/Source/platform/exported/WebString.cpp
|
| diff --git a/third_party/WebKit/Source/platform/exported/WebString.cpp b/third_party/WebKit/Source/platform/exported/WebString.cpp
|
| index 5ff32e9381c8c28c8495f38d2ef4ed4e45382cee..b2dbb187e638e17a3b7a52242cc7d57469cb19d7 100644
|
| --- a/third_party/WebKit/Source/platform/exported/WebString.cpp
|
| +++ b/third_party/WebKit/Source/platform/exported/WebString.cpp
|
| @@ -38,6 +38,18 @@
|
| #include "wtf/text/StringView.h"
|
| #include "wtf/text/WTFString.h"
|
|
|
| +#define STATIC_ASSERT_ENUM(a, b) \
|
| + static_assert(static_cast<int>(a) == static_cast<int>(b), \
|
| + "mismatching enums: " #a)
|
| +
|
| +STATIC_ASSERT_ENUM(WTF::LenientUTF8Conversion,
|
| + blink::WebString::LenientUTF8Conversion);
|
| +STATIC_ASSERT_ENUM(WTF::StrictUTF8Conversion,
|
| + blink::WebString::StrictUTF8Conversion);
|
| +STATIC_ASSERT_ENUM(
|
| + WTF::StrictUTF8ConversionReplacingUnpairedSurrogatesWithFFFD,
|
| + blink::WebString::StrictUTF8ConversionReplacingUnpairedSurrogatesWithFFFD);
|
| +
|
| namespace blink {
|
|
|
| void WebString::reset() {
|
| @@ -68,7 +80,7 @@ const WebUChar* WebString::data16() const {
|
| return !m_private.isNull() && !is8Bit() ? m_private->characters16() : 0;
|
| }
|
|
|
| -std::string WebString::utf8() const {
|
| +std::string WebString::utf8(UTF8ConversionMode mode) const {
|
| StringUTF8Adaptor utf8(m_private.get());
|
| return std::string(utf8.data(), utf8.length());
|
| }
|
|
|