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

Unified Diff: device/vr/vr_service_impl.cc

Issue 2625373002: Fix crash when destory VRServiceImpl (Closed)
Patch Set: Created 3 years, 11 months 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: device/vr/vr_service_impl.cc
diff --git a/device/vr/vr_service_impl.cc b/device/vr/vr_service_impl.cc
index f80037060840dcd2fe3e24e3633c93e4f5fbecc0..9d0fb36618c53e59443d23faf2597e3da3f59b4d 100644
--- a/device/vr/vr_service_impl.cc
+++ b/device/vr/vr_service_impl.cc
@@ -17,6 +17,10 @@ namespace device {
VRServiceImpl::VRServiceImpl() : listening_for_activate_(false) {}
VRServiceImpl::~VRServiceImpl() {
+ // Destroy VRDisplay before calling RemoveService below. RemoveService might
+ // implicitly trigger destory VRDevice which VRDisplay needs to access in its
+ // dtor.
+ displays_.clear();
VRDeviceManager::GetInstance()->RemoveService(this);
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698