From 883840bc17bc8a7b01a870e1bb70b1971dfc35d6 Mon Sep 17 00:00:00 2001 From: Matheus Marchini Date: Tue, 10 Mar 2020 16:58:15 -0700 Subject: [PATCH] deps: patch V8 to run on Xcode 8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Patch V8 (wasm/wasm-module.cc) to remove const qualifier from type passed to template call of `OwnedVector::Of`. Xcode 8 can't convert 'OwnedVector' to 'OwnedVector' when returning from a function (which is likely a bug on Xcode, considering this worked on the prior version of Xcode as well as newer versions). This workaround shouldn't affect the application, since the const qualifier is preserved in the AsmJsOffsetInformation::encoded_offset_. There's also a V8 test passing a const-qualified type to ::Of, but since we don't test V8 on Xcode 8, it should be fine to leave it as is. Signed-off-by: Matheus Marchini Backport-PR-URL: https://github.com/nodejs/node/pull/33376 PR-URL: https://github.com/nodejs/node/pull/32831 Reviewed-By: Anna Henningsen Reviewed-By: Michaƫl Zasso Reviewed-By: Jiawen Geng Reviewed-By: Colin Ihrig --- common.gypi | 2 +- deps/v8/src/wasm/wasm-module.cc | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/common.gypi b/common.gypi index da641d3547b37a..faf92f1f71e1c2 100644 --- a/common.gypi +++ b/common.gypi @@ -36,7 +36,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.7', + 'v8_embedder_string': '-node.8', ##### V8 defaults for Node.js ##### diff --git a/deps/v8/src/wasm/wasm-module.cc b/deps/v8/src/wasm/wasm-module.cc index 4a785c820d9d89..f5905615e20c70 100644 --- a/deps/v8/src/wasm/wasm-module.cc +++ b/deps/v8/src/wasm/wasm-module.cc @@ -129,7 +129,7 @@ void DecodedFunctionNames::AddForTesting(int function_index, AsmJsOffsetInformation::AsmJsOffsetInformation( Vector encoded_offsets) - : encoded_offsets_(OwnedVector::Of(encoded_offsets)) {} + : encoded_offsets_(OwnedVector::Of(encoded_offsets)) {} AsmJsOffsetInformation::~AsmJsOffsetInformation() = default;