Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(471)

Unified Diff: device/vr/vr_display_impl.cc

Issue 2501793002: Prevent the browser from crashing when exiting pages that use WebVR. (Closed)
Patch Set: Rebase Created 4 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « device/vr/vr_display_impl.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: device/vr/vr_display_impl.cc
diff --git a/device/vr/vr_display_impl.cc b/device/vr/vr_display_impl.cc
index 1055b3395dbbec332db72e43c187c1c655b23b63..bdbb073136f33bd921948c5902319f0fcd1f44ad 100644
--- a/device/vr/vr_display_impl.cc
+++ b/device/vr/vr_display_impl.cc
@@ -25,7 +25,7 @@ VRDisplayImpl::VRDisplayImpl(device::VRDevice* device, VRServiceImpl* service)
VRDisplayImpl::~VRDisplayImpl() {}
void VRDisplayImpl::GetPose(const GetPoseCallback& callback) {
- if (!device_->IsAccessAllowed(service_.get())) {
+ if (!device_->IsAccessAllowed(service_)) {
callback.Run(nullptr);
return;
}
@@ -34,7 +34,7 @@ void VRDisplayImpl::GetPose(const GetPoseCallback& callback) {
}
void VRDisplayImpl::ResetPose() {
- if (!device_->IsAccessAllowed(service_.get()))
+ if (!device_->IsAccessAllowed(service_))
return;
device_->ResetPose();
@@ -42,32 +42,32 @@ void VRDisplayImpl::ResetPose() {
void VRDisplayImpl::RequestPresent(bool secureOrigin,
const RequestPresentCallback& callback) {
- if (!device_->IsAccessAllowed(service_.get())) {
+ if (!device_->IsAccessAllowed(service_)) {
callback.Run(false);
return;
}
bool success = device_->RequestPresent(secureOrigin);
if (success) {
- device_->SetPresentingService(service_.get());
+ device_->SetPresentingService(service_);
}
callback.Run(success);
}
void VRDisplayImpl::ExitPresent() {
- if (device_->IsPresentingService(service_.get()))
+ if (device_->IsPresentingService(service_))
device_->ExitPresent();
}
void VRDisplayImpl::SubmitFrame(mojom::VRPosePtr pose) {
- if (!device_->IsPresentingService(service_.get()))
+ if (!device_->IsPresentingService(service_))
return;
device_->SubmitFrame(std::move(pose));
}
void VRDisplayImpl::UpdateLayerBounds(mojom::VRLayerBoundsPtr left_bounds,
mojom::VRLayerBoundsPtr right_bounds) {
- if (!device_->IsAccessAllowed(service_.get()))
+ if (!device_->IsAccessAllowed(service_))
return;
device_->UpdateLayerBounds(std::move(left_bounds), std::move(right_bounds));
« no previous file with comments | « device/vr/vr_display_impl.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698