Skip to content
Snippets Groups Projects
Commit 8d9a3104 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 9ef82b61
No related branches found
No related tags found
No related merge requests found
......@@ -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__);
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment