Skip to content

Commit 8046daf

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: #39245 Refs: nodejs/build#2696 Reviewed-By: Richard Lau <rlau@redhat.com>
1 parent f4377b1 commit 8046daf

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
@@ -34,7 +34,7 @@
3434

3535
# Reset this number to 0 on major V8 upgrades.
3636
# Increment by one for each non-official patch applied to deps/v8.
37-
'v8_embedder_string': '-node.53',
37+
'v8_embedder_string': '-node.54',
3838

3939
##### V8 defaults for Node.js #####
4040

deps/v8/src/base/macros.h

+2-2
Original file line numberDiff line numberDiff line change
@@ -357,14 +357,14 @@ inline T RoundDown(T x, intptr_t m) {
357357
STATIC_ASSERT(std::is_integral<T>::value);
358358
// m must be a power of two.
359359
DCHECK(m != 0 && ((m & (m - 1)) == 0));
360-
return x & -m;
360+
return x & static_cast<T>(-m);
361361
}
362362
template <intptr_t m, typename T>
363363
constexpr inline T RoundDown(T x) {
364364
STATIC_ASSERT(std::is_integral<T>::value);
365365
// m must be a power of two.
366366
STATIC_ASSERT(m != 0 && ((m & (m - 1)) == 0));
367-
return x & -m;
367+
return x & static_cast<T>(-m);
368368
}
369369

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

0 commit comments

Comments
 (0)