| Index: chrome/browser/ui/views/certificate_viewer_win.cc
|
| diff --git a/chrome/browser/ui/views/certificate_viewer_win.cc b/chrome/browser/ui/views/certificate_viewer_win.cc
|
| index 2ae3675d42631d6a629962e468fce5e97e5ce9a2..b3c6dcb090c03372366601cc8408a88a8c2093ac 100644
|
| --- a/chrome/browser/ui/views/certificate_viewer_win.cc
|
| +++ b/chrome/browser/ui/views/certificate_viewer_win.cc
|
| @@ -43,10 +43,16 @@ void ShowCertificateViewerImpl(content::WebContents* web_contents,
|
| // while the the certificate dialog is open.
|
| base::MessageLoop::ScopedNestableTaskAllower allow(
|
| base::MessageLoop::current());
|
| +
|
| + // Tell the message loop to only handle certain types of messages while the
|
| + // dialog is open to avoid bad things happening. See https://crbug.com/344012
|
| + // for details.
|
| + base::MessageLoop::current()->set_os_modal_loop(true);
|
| // This next call blocks but keeps processing windows messages, making it
|
| // modal to the browser window.
|
| ::CryptUIDlgViewCertificate(&view_info, &properties_changed);
|
|
|
| + base::MessageLoop::current()->set_os_modal_loop(false);
|
| CertFreeCertificateContext(cert_list);
|
| }
|
|
|
|
|