Skip to content

Commit

Permalink
deps: patch V8 to run on Xcode 8
Browse files Browse the repository at this point in the history
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<unsigned char>' to 'OwnedVector<const unsigned char>' 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 <[email protected]>

Backport-PR-URL: #33376
PR-URL: #32831
Reviewed-By: Anna Henningsen <[email protected]>
Reviewed-By: Michaël Zasso <[email protected]>
Reviewed-By: Jiawen Geng <[email protected]>
Reviewed-By: Colin Ihrig <[email protected]>
  • Loading branch information
mmarchini authored and targos committed Jun 2, 2020
1 parent 3831a54 commit 883840b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion common.gypi
Original file line number Diff line number Diff line change
Expand Up @@ -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 #####

Expand Down
2 changes: 1 addition & 1 deletion deps/v8/src/wasm/wasm-module.cc
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ void DecodedFunctionNames::AddForTesting(int function_index,

AsmJsOffsetInformation::AsmJsOffsetInformation(
Vector<const byte> encoded_offsets)
: encoded_offsets_(OwnedVector<const uint8_t>::Of(encoded_offsets)) {}
: encoded_offsets_(OwnedVector<uint8_t>::Of(encoded_offsets)) {}

AsmJsOffsetInformation::~AsmJsOffsetInformation() = default;

Expand Down

0 comments on commit 883840b

Please sign in to comment.