Skip to content

Commit 80d3c11

Browse files
richardlautargos
authored andcommitted
deps: V8: cherry-pick 373f4ae739ee
Original commit message: [torque] Don't replace unmodified empty files To improve incremental builds. Bug: v8:7793 Change-Id: I6990a97e058d22d34acd1f609167cd30ca7518ad Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2596789 Reviewed-by: Nico Hartmann <nicohartmann@chromium.org> Commit-Queue: Seth Brenith <seth.brenith@microsoft.com> Cr-Commit-Position: refs/heads/master@{#72053} Refs: v8/v8@373f4ae PR-URL: #37505 Fixes: #37368 Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: Jiawen Geng <technicalcute@gmail.com>
1 parent f2aa305 commit 80d3c11

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
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.26',
39+
'v8_embedder_string': '-node.27',
4040

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

deps/v8/src/torque/utils.cc

+3-1
Original file line numberDiff line numberDiff line change
@@ -317,13 +317,15 @@ void ReplaceFileContentsIfDifferent(const std::string& file_path,
317317
const std::string& contents) {
318318
std::ifstream old_contents_stream(file_path.c_str());
319319
std::string old_contents;
320+
bool file_exists = false;
320321
if (old_contents_stream.good()) {
322+
file_exists = true;
321323
std::istreambuf_iterator<char> eos;
322324
old_contents =
323325
std::string(std::istreambuf_iterator<char>(old_contents_stream), eos);
324326
old_contents_stream.close();
325327
}
326-
if (old_contents.length() == 0 || old_contents != contents) {
328+
if (!file_exists || old_contents != contents) {
327329
std::ofstream new_contents_stream;
328330
new_contents_stream.open(file_path.c_str());
329331
new_contents_stream << contents;

0 commit comments

Comments
 (0)