Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(283)

Unified Diff: src/parsing/parser.cc

Issue 2575133002: [parser] remove %catch parsing (Closed)
Patch Set: try improving the comment again Created 4 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/ast/prettyprinter.cc ('k') | src/parsing/parser-base.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/parsing/parser.cc
diff --git a/src/parsing/parser.cc b/src/parsing/parser.cc
index dffad26ecba679374788e3d06a95c623eca46c8f..13866118626bb20004cd14d5c2c564ce3b04d65e 100644
--- a/src/parsing/parser.cc
+++ b/src/parsing/parser.cc
@@ -1814,15 +1814,9 @@ Statement* Parser::RewriteTryStatement(Block* try_block, Block* catch_block,
DCHECK_NOT_NULL(catch_info.scope);
DCHECK_NOT_NULL(catch_info.variable);
TryCatchStatement* statement;
- if (catch_info.for_promise_reject) {
- statement = factory()->NewTryCatchStatementForPromiseReject(
- try_block, catch_info.scope, catch_info.variable, catch_block,
- kNoSourcePosition);
- } else {
- statement = factory()->NewTryCatchStatement(
- try_block, catch_info.scope, catch_info.variable, catch_block,
- kNoSourcePosition);
- }
+ statement = factory()->NewTryCatchStatement(try_block, catch_info.scope,
+ catch_info.variable,
+ catch_block, kNoSourcePosition);
try_block = factory()->NewBlock(nullptr, 1, false, kNoSourcePosition);
try_block->statements()->Add(statement, zone());
« no previous file with comments | « src/ast/prettyprinter.cc ('k') | src/parsing/parser-base.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698