deps: V8: backport 493cb53691be

Original commit message:

    [include] suppress clang cast-function-type-mismatch warning on SetWeak

    Suppress clang warning cast-function-type-mismatch in embedder calls
    to `SetWeak`.

    Change-Id: I6c4eda1b932199a2ea4947fe851ffdf2ae04ad73
    Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/6689209
    Reviewed-by: Camillo Bruni <cbruni@chromium.org>
    Commit-Queue: Chengzhong Wu <cwu631@bloomberg.net>
    Cr-Commit-Position: refs/heads/main@{#101186}

Ignore `cast-function-type` instead of `cast-function-type-mismatch` for
compatibility with older versions of Clang.

Refs: https://github.com/v8/v8/commit/493cb53691bedf02f5786fe26608199ec5693ba1
PR-URL: https://github.com/nodejs/node/pull/59238
Refs: https://github.com/nodejs/node/issues/58069
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com>
Reviewed-By: Ulises Gascón <ulisesgascongonzalez@gmail.com>
Reviewed-By: Jake Yuesong Li <jake.yuesong@gmail.com>
This commit is contained in:
Chengzhong Wu authored and Node.js GitHub Bot committed 2025-07-29 15:51:26 +00:00
1 parent 751203d36b
commit effe81f712
2 files changed
+8 -1

No files matched your search

+1 -1
View File
@@ -38,7 +38,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.16',
'v8_embedder_string': '-node.17',
##### V8 defaults for Node.js #####
+7
View File
@@ -488,9 +488,16 @@ V8_INLINE void PersistentBase<T>::SetWeak(
#if (__GNUC__ >= 8) && !defined(__clang__)
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wcast-function-type"
#endif
#if __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wcast-function-type"
#endif
api_internal::MakeWeak(this->slot(), parameter,
reinterpret_cast<Callback>(callback), type);
#if __clang__
#pragma clang diagnostic pop
#endif
#if (__GNUC__ >= 8) && !defined(__clang__)
#pragma GCC diagnostic pop
#endif