Migration: disable "apply migration" button after handleAddHintLinkClick

Prevents file corruption if the user adds hints and then tries to
apply the migration result without running migration to account for
the hints.

Fixes #45571.

Bug: https://github.com/dart-lang/sdk/issues/45571
Change-Id: Id11584a1d8b7a6b35127ad828d37b3ef837a5e65
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/194009
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
This commit is contained in:
Paul Berry 2021-04-06 05:12:56 +00:00 committed by commit-bot@chromium.org
parent 0291de4bcf
commit a15e9bc3d2
2 changed files with 3270 additions and 3268 deletions

File diff suppressed because it is too large Load diff

View file

@ -356,6 +356,7 @@ void handleAddHintLinkClick(MouseEvent event) async {
// the response.
await doPost(path);
await loadFile(window.location.pathname, null, null, false);
document.body.classes.add('needs-rerun');
_scrollContentTo(previousScrollPosition);
} catch (e, st) {
handleError("couldn't add/remove hint", e, st);