From b6aec1d00af761f2f184dd05cc9523a73915221c Mon Sep 17 00:00:00 2001 From: Ben Noordhuis Date: Fri, 30 Mar 2018 12:47:02 +0200 Subject: [PATCH] deps: cherry-pick b767cde1e7 from upstream V8 Original commit message: [intl] unbreak build with ICU 57 Remove a call to `icu::toUCharPtr()` that wasn't present in other similar looking call sites either, just reinterpret_cast directly. Fixes https://github.com/nodejs/node/issues/19656. Cq-Include-Trybots: luci.v8.try:v8_linux_noi18n_rel_ng Change-Id: If281ce0a39356aa8bd20efb24c3e4b52b06841a3 Reviewed-on: https://chromium-review.googlesource.com/987953 Reviewed-by: Daniel Ehrenberg Commit-Queue: Ben Noordhuis Cr-Commit-Position: refs/heads/master@{#52311} PR-URL: https://github.com/nodejs/node/pull/19710 Fixes: https://github.com/nodejs/node/issues/19656 Refs: https://github.com/v8/v8/commit/b767cde1e7bb94b3fea13f2d7e10cd90e6813d6c Reviewed-By: Colin Ihrig Reviewed-By: Steven R Loomis Reviewed-By: James M Snell PR-URL: https://github.com/nodejs/node/pull/19980 Reviewed-By: Ali Ijaz Sheikh Reviewed-By: Yang Guo --- common.gypi | 2 +- deps/v8/src/runtime/runtime-intl.cc | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/common.gypi b/common.gypi index 6d83d8a2a1395d..63e1c1867d88be 100644 --- a/common.gypi +++ b/common.gypi @@ -27,7 +27,7 @@ # Reset this number to 0 on major V8 upgrades. # Increment by one for each non-official patch applied to deps/v8. - 'v8_embedder_string': '-node.2', + 'v8_embedder_string': '-node.3', # Enable disassembler for `--print-code` v8 options 'v8_enable_disassembler': 1, diff --git a/deps/v8/src/runtime/runtime-intl.cc b/deps/v8/src/runtime/runtime-intl.cc index a0e0db8cd04ac9..385f386b6bbc82 100644 --- a/deps/v8/src/runtime/runtime-intl.cc +++ b/deps/v8/src/runtime/runtime-intl.cc @@ -627,8 +627,7 @@ RUNTIME_FUNCTION(Runtime_PluralRulesSelect) { icu::UnicodeString result = plural_rules->select(rounded); return *isolate->factory() ->NewStringFromTwoByte(Vector( - reinterpret_cast( - icu::toUCharPtr(result.getBuffer())), + reinterpret_cast(result.getBuffer()), result.length())) .ToHandleChecked(); }