Skip to content

Commit 00d461e

Browse files
richardlautargos
authored andcommitted
deps: V8: cherry-pick c5ab3e4f0c5a
Original commit message: libstdc++: fix incomplete type in v8::internal::is_subtype<T, U> Using std::convertible with incomplete types is UB. However, till GCC 12 it was accepted and std::convertible returned false. This fails now for e.g. v8::internal::WasmArray. Use std::disjunction and std::conjunction instead which are short- circuiting, because std::is_base_of<T, T> is already true. Bug: chromium:957519 Change-Id: Ia26643dbdf0fb00d5586c71ae6b18e8d0f3cf96e Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4394663 Commit-Queue: Stephan Hartmann <[email protected]> Reviewed-by: Clemens Backes <[email protected]> Cr-Commit-Position: refs/heads/main@{#86904} Refs: v8/v8@c5ab3e4 PR-URL: #47736 Fixes: #47623 Reviewed-By: Michaël Zasso <[email protected]> Reviewed-By: Jiawen Geng <[email protected]>
1 parent dc43ce7 commit 00d461e

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

common.gypi

+1-1
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@
3636

3737
# Reset this number to 0 on major V8 upgrades.
3838
# Increment by one for each non-official patch applied to deps/v8.
39-
'v8_embedder_string': '-node.4',
39+
'v8_embedder_string': '-node.5',
4040

4141
##### V8 defaults for Node.js #####
4242

deps/v8/src/codegen/tnode.h

+3-2
Original file line numberDiff line numberDiff line change
@@ -269,8 +269,9 @@ using BuiltinPtr = Smi;
269269
template <class T, class U>
270270
struct is_subtype {
271271
static const bool value =
272-
std::is_base_of<U, T>::value || (std::is_same<U, MaybeObject>::value &&
273-
std::is_convertible<T, Object>::value);
272+
std::disjunction<std::is_base_of<U, T>,
273+
std::conjunction<std::is_same<U, MaybeObject>,
274+
std::is_convertible<T, Object>>>::value;
274275
};
275276
template <class T1, class T2, class U>
276277
struct is_subtype<UnionT<T1, T2>, U> {

0 commit comments

Comments
 (0)