Chromium Code Reviews| Index: device/vr/vr_service_impl.cc |
| diff --git a/device/vr/vr_service_impl.cc b/device/vr/vr_service_impl.cc |
| index 05b75b07221d06b45bbbbd7a4705902fad213047..1eb82d053bc0a73ee0cc9ff03da6da5134c5a987 100644 |
| --- a/device/vr/vr_service_impl.cc |
| +++ b/device/vr/vr_service_impl.cc |
| @@ -36,8 +36,8 @@ void VRServiceImpl::SetClient(mojom::VRServiceClientPtr service_client, |
| client_ = std::move(service_client); |
| VRDeviceManager* device_manager = VRDeviceManager::GetInstance(); |
| // Once a client has been connected AddService will force any VRDisplays to |
| - // send OnConnected to it so that it's populated with the currently active |
| - // displays. Thereafer it will stay up to date by virtue of listening for new |
| + // send ConnectDevice to it so that it's populated with the currently active |
| + // displays. Thereafter it will stay up to date by virtue of listening for new |
| // connected events. |
| device_manager->AddService(this); |
| callback.Run(device_manager->GetNumberOfConnectedDevices()); |
| @@ -69,6 +69,10 @@ void VRServiceImpl::OnVRDisplayInfoCreated( |
| "process is not established"; |
| return; |
| } |
| + if (!display_info) { |
| + // We cannot instantiate a display with a null display info. |
|
amp
2017/03/24 22:33:31
Would be nice to call out (until we fix it) the re
tiborg
2017/03/27 14:53:25
Added a comment to clarify.
|
| + return; |
| + } |
| displays_[device] = base::MakeUnique<VRDisplayImpl>( |
| device, this, client_.get(), std::move(display_info)); |
| } |