diff --git a/common.gypi b/common.gypi index e3b0bde754a185..8411b7d7801003 100644 --- a/common.gypi +++ b/common.gypi @@ -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.0', + 'v8_embedder_string': '-node.1', ##### V8 defaults for Node.js ##### diff --git a/deps/v8/src/snapshot/embedded/platform-embedded-file-writer-win.cc b/deps/v8/src/snapshot/embedded/platform-embedded-file-writer-win.cc index 69457e11a5537a..b336e343392b50 100644 --- a/deps/v8/src/snapshot/embedded/platform-embedded-file-writer-win.cc +++ b/deps/v8/src/snapshot/embedded/platform-embedded-file-writer-win.cc @@ -569,7 +569,11 @@ void PlatformEmbeddedFileWriterWin::DeclareExternalFilename( // Replace any Windows style paths (backslashes) with forward // slashes. std::string fixed_filename(filename); - std::replace(fixed_filename.begin(), fixed_filename.end(), '\\', '/'); + for (auto& c : fixed_filename) { + if (c == '\\') { + c = '/'; + } + } fprintf(fp_, ".file %d \"%s\"\n", fileid, fixed_filename.c_str()); } diff --git a/deps/v8/src/torque/csa-generator.cc b/deps/v8/src/torque/csa-generator.cc index d7233aceb224db..a29f832e7de92e 100644 --- a/deps/v8/src/torque/csa-generator.cc +++ b/deps/v8/src/torque/csa-generator.cc @@ -56,10 +56,14 @@ Stack CSAGenerator::EmitBlock(const Block* block) { } void CSAGenerator::EmitSourcePosition(SourcePosition pos, bool always_emit) { - const std::string& file = SourceFileMap::GetSource(pos.source); + std::string file = SourceFileMap::GetSource(pos.source); if (always_emit || !previous_position_.CompareStartIgnoreColumn(pos)) { // Lines in Torque SourcePositions are zero-based, while the // CodeStubAssembler and downwind systems are one-based. + for (auto& c : file) { + if (c == '\\') + c = '/'; + } out_ << " ca_.SetSourcePosition(\"" << file << "\", " << (pos.start.line + 1) << ");\n"; previous_position_ = pos;