Index: src/parsing/parser.h |
diff --git a/src/parsing/parser.h b/src/parsing/parser.h |
index 20c79371822276d08a8b1691a4855a9fb090ad59..81c4255aafc053940d1391335735057c9a4bdd3c 100644 |
--- a/src/parsing/parser.h |
+++ b/src/parsing/parser.h |
@@ -543,6 +543,7 @@ class V8_EXPORT_PRIVATE Parser : public NON_EXPORTED_BASE(ParserBase<Parser>) { |
Block* BuildParameterInitializationBlock( |
const ParserFormalParameters& parameters, bool* ok); |
Block* BuildRejectPromiseOnException(Block* block); |
+ Block* BuildRejectPromiseOnExceptionForParameters(Block* block); |
ZoneList<Statement*>* ParseFunction( |
const AstRawString* function_name, int pos, FunctionKind kind, |
@@ -628,9 +629,10 @@ class V8_EXPORT_PRIVATE Parser : public NON_EXPORTED_BASE(ParserBase<Parser>) { |
Expression* BuildInitialYield(int pos, FunctionKind kind); |
Assignment* BuildCreateJSGeneratorObject(int pos, FunctionKind kind); |
- Expression* BuildResolvePromise(Expression* value, int pos); |
- Expression* BuildRejectPromise(Expression* value, int pos); |
+ Expression* BuildResolvePromise(); |
+ Expression* BuildRejectPromise(Variable* value); |
Variable* PromiseVariable(); |
+ Variable* AsyncReturnVariable(); |
// Generic AST generator for throwing errors from compiled code. |
Expression* NewThrowError(Runtime::FunctionId function_id, |
@@ -1042,7 +1044,7 @@ class V8_EXPORT_PRIVATE Parser : public NON_EXPORTED_BASE(ParserBase<Parser>) { |
auto* init_block = BuildParameterInitializationBlock(parameters, ok); |
if (!*ok) return; |
if (is_async) { |
- init_block = BuildRejectPromiseOnException(init_block); |
+ init_block = BuildRejectPromiseOnExceptionForParameters(init_block); |
} |
if (init_block != nullptr) body->Add(init_block, zone()); |
} |