Commit 23632f77 authored by Maksim Ivanov's avatar Maksim Ivanov Committed by Commit Bot

Fix double-callback-call crashes in...

Fix double-callback-call crashes in //content/shell/browser/web_test/web_test_storage_access_manager.cc

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

Bug: 1122844
Change-Id: I9fddd7f0c65c877270a86d871044e7b636f75c56
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2384469
Commit-Queue: Maksim Ivanov <emaxx@chromium.org>
Reviewed-by: default avatarMike West <mkwst@chromium.org>
Cr-Commit-Position: refs/heads/master@{#804222}
parent e724abf0
......@@ -33,11 +33,13 @@ void WebTestStorageAccessManager::SetStorageAccess(
auto primary_pattern = ContentSettingsPattern::FromString(origin);
if (!primary_pattern.IsValid()) {
std::move(callback).Run(false);
return;
}
auto secondary_pattern = ContentSettingsPattern::FromString(embedding_origin);
if (!secondary_pattern.IsValid()) {
std::move(callback).Run(false);
return;
}
content_settings_for_automation_.push_back(
......
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