[vm] Fix coverage test regression

This was an existing bug that was exposed by
https://dart-review.googlesource.com/c/sdk/+/266640

Bug: https://github.com/dart-lang/sdk/issues/50356
Change-Id: Ib11ec1587d2b328da0c3e04d1202cf6e2171ec02
Fixes: https://github.com/dart-lang/sdk/issues/50356
TEST=pkg-linux-debug bot, where the failure was seen
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/267145
Reviewed-by: Alexander Markov <alexmarkov@google.com>
Commit-Queue: Liam Appelbe <liama@google.com>
This commit is contained in:
Liam Appelbe 2022-11-02 01:32:52 +00:00 committed by Commit Queue
parent bf9a9a7abd
commit e73cc6feb1

View file

@ -760,7 +760,7 @@ void SourceReport::CollectAllScripts(
// New one. Insert.
ScriptTableEntry* tmp = new ScriptTableEntry();
tmp->key = &url;
tmp->index = next_script_index_++;
tmp->index = -1;
tmp->script = wrapper.script;
local_script_table_entries->Add(tmp);
local_script_table->Insert(tmp);