Skip to content

Commit

Permalink
deps: V8: cherry-pick 2a0bc36dec12
Browse files Browse the repository at this point in the history
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 <jgruber@chromium.org>
    Reviewed-by: Leszek Swirski <leszeks@chromium.org>
    Commit-Queue: Jakob Gruber <jgruber@chromium.org>
    Cr-Commit-Position: refs/heads/main@{#77313}

Refs: v8/v8@2a0bc36

PR-URL: #40178
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Jiawen Geng <technicalcute@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
  • Loading branch information
targos committed Oct 17, 2021
1 parent 19673c7 commit 9f098fd
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
2 changes: 1 addition & 1 deletion common.gypi
Original file line number Diff line number Diff line change
Expand Up @@ -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 #####

Expand Down
7 changes: 7 additions & 0 deletions deps/v8/src/parsing/parser.h
Original file line number Diff line number Diff line change
Expand Up @@ -709,6 +709,13 @@ class V8_EXPORT_PRIVATE Parser : public NON_EXPORTED_BASE(ParserBase<Parser>) {
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();
}
Expand Down

0 comments on commit 9f098fd

Please sign in to comment.