Commit dbec99ef authored by jamiewalch's avatar jamiewalch Committed by Commit bot

Don't create a pairing registry on platforms that don't provide a delegate.

This was broken by https://codereview.chromium.org/834673007. Constructing
a PairingRegistry with a null delegate causes pairing to be offered, but if
selected, the host process will crash.

BUG=455501

Review URL: https://codereview.chromium.org/903963002

Cr-Commit-Position: refs/heads/master@{#314969}
parent 7722ddf9
...@@ -629,8 +629,9 @@ void HostProcess::CreateAuthenticatorFactory() { ...@@ -629,8 +629,9 @@ void HostProcess::CreateAuthenticatorFactory() {
scoped_ptr<PairingRegistry::Delegate> delegate = scoped_ptr<PairingRegistry::Delegate> delegate =
CreatePairingRegistryDelegate(); CreatePairingRegistryDelegate();
pairing_registry_ = new PairingRegistry(context_->file_task_runner(), if (delegate)
delegate.Pass()); pairing_registry_ = new PairingRegistry(context_->file_task_runner(),
delegate.Pass());
} }
#endif // defined(OS_WIN) #endif // defined(OS_WIN)
......
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