Commit 3673c1ce authored by Varun Khaneja's avatar Varun Khaneja Committed by Commit Bot

[Speculative crash fix] Call the clipboard API directly and std::move the result

See https://crbug.com/973928#c21 for details for the reason for speculation.

R=dvadym

Bug: 973928, 948767
Change-Id: I760fcb8ed2bcbd75975a0638b70f4a035e4293a6
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1731698
Commit-Queue: Vadym Doroshenko <dvadym@chromium.org>
Reviewed-by: default avatarVadym Doroshenko <dvadym@chromium.org>
Auto-Submit: Varun Khaneja <vakh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#683567}
parent 0d549140
......@@ -731,7 +731,14 @@ void ChromePasswordManagerClient::DidStartNavigation(
#if defined(SYNC_PASSWORD_REUSE_DETECTION_ENABLED)
void ChromePasswordManagerClient::OnPaste() {
password_reuse_detection_manager_.OnPaste(GetTextFromClipboard());
// TODO(vakh): This method should just call |GetTextFromClipboard()| directly
// but it seems to be causing crbug.com/973928 so for now, call the clipboard
// API directly to see if that fixes the issue.
// See https://crbug.com/973928#c21 for details.
base::string16 text;
ui::Clipboard::GetForCurrentThread()->ReadText(ui::ClipboardType::kCopyPaste,
&text);
password_reuse_detection_manager_.OnPaste(std::move(text));
}
base::string16 ChromePasswordManagerClient::GetTextFromClipboard() {
......
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