diff options
author | Allan Sandfeld Jensen <allan.jensen@qt.io> | 2020-10-12 14:27:29 +0200 |
---|---|---|
committer | Allan Sandfeld Jensen <allan.jensen@qt.io> | 2020-10-13 09:35:20 +0000 |
commit | c30a6232df03e1efbd9f3b226777b07e087a1122 (patch) | |
tree | e992f45784689f373bcc38d1b79a239ebe17ee23 /chromium/v8/src/parsing/parsing.cc | |
parent | 7b5b123ac58f58ffde0f4f6e488bcd09aa4decd3 (diff) | |
download | qtwebengine-chromium-85-based.tar.gz |
BASELINE: Update Chromium to 85.0.4183.14085-based
Change-Id: Iaa42f4680837c57725b1344f108c0196741f6057
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
Diffstat (limited to 'chromium/v8/src/parsing/parsing.cc')
-rw-r--r-- | chromium/v8/src/parsing/parsing.cc | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/chromium/v8/src/parsing/parsing.cc b/chromium/v8/src/parsing/parsing.cc index e126874d7dc..53f6cf045b7 100644 --- a/chromium/v8/src/parsing/parsing.cc +++ b/chromium/v8/src/parsing/parsing.cc @@ -7,6 +7,7 @@ #include <memory> #include "src/ast/ast.h" +#include "src/base/v8-fallthrough.h" #include "src/execution/vm-state-inl.h" #include "src/handles/maybe-handles.h" #include "src/objects/objects-inl.h" @@ -24,14 +25,13 @@ namespace { void MaybeReportErrorsAndStatistics(ParseInfo* info, Handle<Script> script, Isolate* isolate, Parser* parser, - ReportErrorsAndStatisticsMode mode) { - if (mode == ReportErrorsAndStatisticsMode::kYes) { - if (info->literal() == nullptr) { - info->pending_error_handler()->PrepareErrors(isolate, - info->ast_value_factory()); - info->pending_error_handler()->ReportErrors(isolate, script); - } - parser->UpdateStatistics(isolate, script); + ReportStatisticsMode mode) { + switch (mode) { + case ReportStatisticsMode::kYes: + parser->UpdateStatistics(isolate, script); + break; + case ReportStatisticsMode::kNo: + break; } } @@ -39,7 +39,7 @@ void MaybeReportErrorsAndStatistics(ParseInfo* info, Handle<Script> script, bool ParseProgram(ParseInfo* info, Handle<Script> script, MaybeHandle<ScopeInfo> maybe_outer_scope_info, - Isolate* isolate, ReportErrorsAndStatisticsMode mode) { + Isolate* isolate, ReportStatisticsMode mode) { DCHECK(info->flags().is_toplevel()); DCHECK_NULL(info->literal()); @@ -62,12 +62,12 @@ bool ParseProgram(ParseInfo* info, Handle<Script> script, } bool ParseProgram(ParseInfo* info, Handle<Script> script, Isolate* isolate, - ReportErrorsAndStatisticsMode mode) { + ReportStatisticsMode mode) { return ParseProgram(info, script, kNullMaybeHandle, isolate, mode); } bool ParseFunction(ParseInfo* info, Handle<SharedFunctionInfo> shared_info, - Isolate* isolate, ReportErrorsAndStatisticsMode mode) { + Isolate* isolate, ReportStatisticsMode mode) { DCHECK(!info->flags().is_toplevel()); DCHECK(!shared_info.is_null()); DCHECK_NULL(info->literal()); @@ -93,7 +93,7 @@ bool ParseFunction(ParseInfo* info, Handle<SharedFunctionInfo> shared_info, } bool ParseAny(ParseInfo* info, Handle<SharedFunctionInfo> shared_info, - Isolate* isolate, ReportErrorsAndStatisticsMode mode) { + Isolate* isolate, ReportStatisticsMode mode) { DCHECK(!shared_info.is_null()); if (info->flags().is_toplevel()) { MaybeHandle<ScopeInfo> maybe_outer_scope_info; |