Commit b9d7176e authored by Maksim Ivanov's avatar Maksim Ivanov Committed by Commit Bot

Fix use-after-move in //c/b/ui/views/extensions/

Fix use-after-move (potential) bugs found by the
"bugprone-use-after-move" clang-tidy check.

Bug: 1122844
Change-Id: I36d91b00183ce25f486dc42efb344cd537d63af8
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2556677
Auto-Submit: Maksim Ivanov <emaxx@chromium.org>
Reviewed-by: default avatarFinnur Thorarinsson <finnur@chromium.org>
Commit-Queue: Maksim Ivanov <emaxx@chromium.org>
Cr-Commit-Position: refs/heads/master@{#831058}
parent 0e897d36
......@@ -128,8 +128,9 @@ IN_PROC_BROWSER_TEST_F(ExtensionInstallDialogViewTestSupervised, AskAParent) {
ExtensionInstallPrompt install_prompt(profile(), nullptr);
base::RunLoop run_loop;
ExtensionInstallPromptTestHelper helper(run_loop.QuitClosure());
const extensions::Extension* const extension = prompt->extension();
install_prompt.ShowDialog(
helper.GetCallback(), prompt->extension(), nullptr, std::move(prompt),
helper.GetCallback(), extension, nullptr, std::move(prompt),
ExtensionInstallPrompt::GetDefaultShowDialogCallback());
run_loop.Run();
EXPECT_EQ(ExtensionInstallPrompt::Result::ACCEPTED, helper.result());
......@@ -202,8 +203,9 @@ IN_PROC_BROWSER_TEST_F(ExtensionInstallDialogViewTestSupervised,
ExtensionInstallPrompt install_prompt(profile(), nullptr);
base::RunLoop run_loop;
ExtensionInstallPromptTestHelper helper(run_loop.QuitClosure());
const extensions::Extension* const extension = prompt->extension();
install_prompt.ShowDialog(
helper.GetCallback(), prompt->extension(), nullptr, std::move(prompt),
helper.GetCallback(), extension, nullptr, std::move(prompt),
ExtensionInstallPrompt::GetDefaultShowDialogCallback());
run_loop.Run();
EXPECT_EQ(ExtensionInstallPrompt::Result::USER_CANCELED, helper.result());
......
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