Reland: [ES6 modules] ModuleMap::GetFetchedModuleScript to return nullptr when entry not found / "fetching"

The memory leak in the layout test is now addressed.

---
[ES6 modules] ModuleMap::GetFetchedModuleScript to return nullptr when entry not found / "fetching"

Before this CL, we asserted that ModuleMap::GetFetchedModuleScript always queried load completed module scripts, but it was not always the case.
This CL changes the member function to return nullptr if the entry doesn't exist or the entry is being fetched.

This CL fixes a crash that happens when we early-exit module script graph fetch by a sub-graph instantiation failed, but there are still partial subgraph in flight.

Bug: 718442, 594639
Change-Id: Ia99883889bff4770dc03016413ed4c94c42f8902
Reviewed-on: https://chromium-review.googlesource.com/517684
Reviewed-by: Yutaka Hirano <yhirano@chromium.org>
Commit-Queue: Kouhei Ueno <kouhei@chromium.org>
Cr-Commit-Position: refs/heads/master@{#475420}
5 files changed