Commit 6cc91d6a authored by littledan's avatar littledan Committed by Commit bot

[parser] Harden DCHECK into CHECK in parser

A DCHECK is guarding something which has previously been a memory
integrity issue. It should be cheap to run. This patch makes it
into a CHECK.

BUG=chromium:658267

Review-Url: https://codereview.chromium.org/2584223002
Cr-Commit-Position: refs/heads/master@{#41825}
parent 8c6ace98
...@@ -46,8 +46,8 @@ void FuncNameInferrer::PushVariableName(const AstRawString* name) { ...@@ -46,8 +46,8 @@ void FuncNameInferrer::PushVariableName(const AstRawString* name) {
void FuncNameInferrer::RemoveAsyncKeywordFromEnd() { void FuncNameInferrer::RemoveAsyncKeywordFromEnd() {
if (IsOpen()) { if (IsOpen()) {
DCHECK(names_stack_.length() > 0); CHECK(names_stack_.length() > 0);
DCHECK(names_stack_.last().name->IsOneByteEqualTo("async")); CHECK(names_stack_.last().name->IsOneByteEqualTo("async"));
names_stack_.RemoveLast(); names_stack_.RemoveLast();
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment