Skip to content

Commit 7fdd6ec

Browse files
targosrichardlau
authored andcommitted
deps: V8: cherry-pick 0b3a4ecf7083
Original commit message: Fix implicit conversion loses integer precision warning The type of m is long in 64 bits build, and results implicit conversion loses integer precision, which was found by improved clang warning (-Wshorten-64-to-32) Bug: chromium:1124085 Change-Id: Ic9f22508bd817a06d5c90162b1ac3554a7171529 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2391323 Commit-Queue: Zequan Wu <zequanwu@google.com> Auto-Submit: Zequan Wu <zequanwu@google.com> Reviewed-by: Nico Weber <thakis@chromium.org> Reviewed-by: Igor Sheludko <ishell@chromium.org> Cr-Commit-Position: refs/heads/master@{#69686} Refs: v8/v8@0b3a4ec PR-URL: #39244 Refs: nodejs/build#2696 Reviewed-By: Richard Lau <rlau@redhat.com>
1 parent 4be2e87 commit 7fdd6ec

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-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.70',
39+
'v8_embedder_string': '-node.71',
4040

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

deps/v8/src/base/macros.h

+2-2
Original file line numberDiff line numberDiff line change
@@ -339,14 +339,14 @@ inline T RoundDown(T x, intptr_t m) {
339339
STATIC_ASSERT(std::is_integral<T>::value);
340340
// m must be a power of two.
341341
DCHECK(m != 0 && ((m & (m - 1)) == 0));
342-
return x & -m;
342+
return x & static_cast<T>(-m);
343343
}
344344
template <intptr_t m, typename T>
345345
constexpr inline T RoundDown(T x) {
346346
STATIC_ASSERT(std::is_integral<T>::value);
347347
// m must be a power of two.
348348
STATIC_ASSERT(m != 0 && ((m & (m - 1)) == 0));
349-
return x & -m;
349+
return x & static_cast<T>(-m);
350350
}
351351

352352
// Return the smallest multiple of m which is >= x.

0 commit comments

Comments
 (0)