Bug 1624009 - AddressSanitizer: SEGV /builds/worker/workspace/obj-build/dist/include/mozilla/MozPromise.h in mozilla::MozPromise<bool, mozilla::ipc::ResponseRejectReason, true>::ThenValue<mozilla::dom::Navigator::GetVRDisplays(mozilla... r=daoshengmu,kip,smaug
authorthomasmo <thomasmo@mozilla.com>
Wed, 01 Apr 2020 10:38:18 +0000
changeset 521866 96eedd640ac415f56cffe9ecadaa8ba734519f30
parent 521865 9cf0341dd964c30651945f1b5634e8458ba83212
child 521867 8b7993c7dae941c8d2377bffce4c7a85636e0ee5
push id111872
push usertmoore@mozilla.com
push dateThu, 02 Apr 2020 14:53:19 +0000
treeherderautoland@96eedd640ac4 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersdaoshengmu, kip, smaug
bugs1624009
milestone76.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1624009 - AddressSanitizer: SEGV /builds/worker/workspace/obj-build/dist/include/mozilla/MozPromise.h in mozilla::MozPromise<bool, mozilla::ipc::ResponseRejectReason, true>::ThenValue<mozilla::dom::Navigator::GetVRDisplays(mozilla... r=daoshengmu,kip,smaug ...::ErrorResult&)::$_2, mozilla::dom: This change fixes a failfast where an outstanding permissions dialog can cause an IPC call to fail while determining whether to enumerate VR displays. This change now rejects the promise in that case. Differential Revision: https://phabricator.services.mozilla.com/D68635
dom/base/Navigator.cpp
--- a/dom/base/Navigator.cpp
+++ b/dom/base/Navigator.cpp
@@ -1484,18 +1484,18 @@ already_AddRefed<Promise> Navigator::Get
     RefPtr<Navigator> self(this);
     int browserID = browser->ChromeOuterWindowID();
 
     browser->SendIsWindowSupportingWebVR(browserID)->Then(
         GetCurrentThreadSerialEventTarget(), __func__,
         [self, p](bool isSupported) {
           self->FinishGetVRDisplays(isSupported, p);
         },
-        [](const mozilla::ipc::ResponseRejectReason) {
-          MOZ_CRASH("Failed to make IPC call to IsWindowSupportingWebVR");
+        [p](const mozilla::ipc::ResponseRejectReason) {
+          p->MaybeRejectWithTypeError("Unable to start display enumeration");
         });
   }
 
   return p.forget();
 }
 
 void Navigator::FinishGetVRDisplays(bool isWebVRSupportedInwindow, Promise* p) {
   if (!isWebVRSupportedInwindow) {