Commit bf31f731 authored by Makoto Kato's avatar Makoto Kato
Browse files

Bug 1748981 - hal::LockScreenOrientation in content process never returns...

Bug 1748981 - hal::LockScreenOrientation in content process never returns rejected promise even if platform's implementation returns rejected promise. r=calu

IPC's promise returns resolved promise when IPC connection is successful. So
even if platform implementations such as android returns rejected promise, it
 is converted to resolved promise by SandboxHal.cpp unfortunately.

So we should check return value when RecvLockScreenOrientation returns false.

Differential Revision: https://phabricator.services.mozilla.com/D135330
parent cd2693c5
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -90,7 +90,7 @@ RefPtr<mozilla::MozPromise<bool, bool, false>> LockScreenOrientation(
          GetCurrentSerialEventTarget(), __func__,
          [=](const mozilla::MozPromise<bool, ipc::ResponseRejectReason,
                                        true>::ResolveOrRejectValue& aValue) {
            if (aValue.IsResolve()) {
            if (aValue.IsResolve() && aValue.ResolveValue()) {
              return mozilla::MozPromise<bool, bool, false>::CreateAndResolve(
                  true, __func__);
            }