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 <[email protected]>
    Reviewed-by: Leszek Swirski <[email protected]>
    Commit-Queue: Jakob Gruber <[email protected]>
    Cr-Commit-Position: refs/heads/main@{#77313}

Refs: v8/v8@2a0bc36

PR-URL: #40178
Reviewed-By: Antoine du Hamel <[email protected]>
Reviewed-By: Jiawen Geng <[email protected]>
Reviewed-By: Colin Ihrig <[email protected]>
  • Loading branch information
targos committed Nov 21, 2021
1 parent 94acaae commit e60053d
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.9',
'v8_embedder_string': '-node.10',

##### 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 e60053d

Please sign in to comment.