From 9f098fdc7328be0d80e415a7557149b41ef85757 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C3=ABl=20Zasso?= Date: Mon, 11 Oct 2021 17:31:57 +0200 Subject: [PATCH] deps: V8: cherry-pick 2a0bc36dec12 Original commit message: [parser] Fix the MSVC build MSVC seems to instantiate the Parser::PreParserIdentifierToAstRawString method despite it being unused. This CL adds an (unreachable) definition for it. Bug: v8:12266 Change-Id: I355ca82a9d6b7bc8cd16768a8df93e40f8bfc638 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3199856 Reviewed-by: Jakob Gruber Reviewed-by: Leszek Swirski Commit-Queue: Jakob Gruber Cr-Commit-Position: refs/heads/main@{#77313} Refs: https://github.com/v8/v8/commit/2a0bc36dec121c9f30e3c18e8ed1f0d0b4f2ed7c PR-URL: https://github.com/nodejs/node/pull/40178 Reviewed-By: Antoine du Hamel Reviewed-By: Jiawen Geng Reviewed-By: Colin Ihrig --- common.gypi | 2 +- deps/v8/src/parsing/parser.h | 7 +++++++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/common.gypi b/common.gypi index 5f8750afc311e9..a70b91fa05fb78 100644 --- a/common.gypi +++ b/common.gypi @@ -36,7 +36,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.8', + 'v8_embedder_string': '-node.9', ##### V8 defaults for Node.js ##### diff --git a/deps/v8/src/parsing/parser.h b/deps/v8/src/parsing/parser.h index c5cc0c8030781c..5699148c3b3575 100644 --- a/deps/v8/src/parsing/parser.h +++ b/deps/v8/src/parsing/parser.h @@ -709,6 +709,13 @@ class V8_EXPORT_PRIVATE Parser : public NON_EXPORTED_BASE(ParserBase) { return arg; } + const AstRawString* PreParserIdentifierToAstRawString( + const PreParserIdentifier& arg) { + // This method definition is only needed due to an MSVC oddity that + // instantiates the method despite it being unused. See crbug.com/v8/12266 . + UNREACHABLE(); + } + IterationStatement* AsIterationStatement(BreakableStatement* s) { return s->AsIterationStatement(); }