[vm/compiler] added assert to kernel flowgraph builder

Rationale:
Yields a more gentle crash in debug mode for
bug under investigation (found by DartFuzz)

https://github.com/dart-lang/sdk/issues/36076

Change-Id: I497fbef1ec2100b9701848c3454bef5ad7518d2b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/95280
Reviewed-by: Alexander Markov <alexmarkov@google.com>
Commit-Queue: Aart Bik <ajcbik@google.com>
This commit is contained in:
Aart Bik
2019-03-04 19:30:53 +00:00
committed by commit-bot@chromium.org
parent b88e6dd910
commit 571ea80e11
@@ -2630,6 +2630,7 @@ Fragment StreamingFlowGraphBuilder::TranslateFinallyFinalizers(
// While translating the body of a finalizer we need to set the try-finally
// block which is active when translating the body.
while (B->try_finally_block_ != outer_finally) {
ASSERT(B->try_finally_block_ != nullptr);
// Set correct try depth (in case there are nested try statements).
B->try_depth_ = B->try_finally_block_->try_depth();