Index: src/parsing/func-name-inferrer.cc |
diff --git a/src/parsing/func-name-inferrer.cc b/src/parsing/func-name-inferrer.cc |
index 0821be0a68a623012df807fb948990a1b38ca5d9..a86e1c299fe28b2afd59b73a00cf661f8a1dd54e 100644 |
--- a/src/parsing/func-name-inferrer.cc |
+++ b/src/parsing/func-name-inferrer.cc |
@@ -45,9 +45,11 @@ void FuncNameInferrer::PushVariableName(const AstRawString* name) { |
} |
void FuncNameInferrer::RemoveAsyncKeywordFromEnd() { |
- DCHECK(names_stack_.length() > 0); |
- DCHECK(names_stack_.last().name->IsOneByteEqualTo("async")); |
- names_stack_.RemoveLast(); |
+ if (IsOpen()) { |
caitp
2016/11/18 17:18:33
I like the straight forward fix, thanks. lgtm
|
+ DCHECK(names_stack_.length() > 0); |
+ DCHECK(names_stack_.last().name->IsOneByteEqualTo("async")); |
+ names_stack_.RemoveLast(); |
+ } |
} |
const AstString* FuncNameInferrer::MakeNameFromStack() { |