icu.patch 1.8 KB
Newer Older
1
description: backwards compatibility for older versions of icu
Michael Gilbert's avatar
Michael Gilbert committed
2 3
author: Michael Gilbert <mgilbert@debian.org>

4 5
--- a/v8/src/runtime/runtime-intl.cc
+++ b/v8/src/runtime/runtime-intl.cc
6
@@ -714,7 +714,11 @@ RUNTIME_FUNCTION(Runtime_PluralRulesSele
7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30
   return *isolate->factory()
               ->NewStringFromTwoByte(Vector<const uint16_t>(
                   reinterpret_cast<const uint16_t*>(
+#if U_ICU_VERSION_MAJOR_NUM >= 59
                       icu::toUCharPtr(result.getBuffer())),
+#else
+                      result.getBuffer()),
+#endif
                   result.length()))
               .ToHandleChecked();
 }
--- a/third_party/WebKit/Source/platform/graphics/LoggingCanvas.cpp
+++ b/third_party/WebKit/Source/platform/graphics/LoggingCanvas.cpp
@@ -527,8 +527,12 @@ String StringForUTF32LEText(const void*
   utf16 = icu::UnicodeString::fromUTF32(reinterpret_cast<const UChar32*>(text),
                                         static_cast<int32_t>(byte_length));
 #endif
+#if U_ICU_VERSION_MAJOR_NUM >= 59
   return String(icu::toUCharPtr(utf16.getBuffer()),
                 static_cast<unsigned>(utf16.length()));
+#else
+  return String(utf16.getBuffer(),static_cast<unsigned>(utf16.length()));
+#endif
 }
Michael Gilbert's avatar
Michael Gilbert committed
31
 
32
 String StringForText(const void* text,
33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52
--- a/net/BUILD.gn
+++ b/net/BUILD.gn
@@ -11,7 +11,6 @@ import("//build/config/ui.gni")
 import("//net/features.gni")
 import("//testing/libfuzzer/fuzzer_test.gni")
 import("//testing/test.gni")
-import("//third_party/icu/config.gni")
 import("//third_party/protobuf/proto_library.gni")
 import("//tools/grit/grit_rule.gni")
 import("//url/features.gni")
--- a/v8/gni/isolate.gni
+++ b/v8/gni/isolate.gni
@@ -3,7 +3,6 @@
 # found in the LICENSE file.
 
 import("//build/config/sanitizers/sanitizers.gni")
-import("//third_party/icu/config.gni")
 import("v8.gni")
 
 declare_args() {