Bug 1750142 - Don't return nullptr for LockScreenOrientation. r=geckoview-reviewers,calu

We should return rejected promise instead of `nullptr` to make simple.

Differential Revision: https://phabricator.services.mozilla.com/D135980
This commit is contained in:
Makoto Kato 2022-01-15 11:19:54 +00:00
parent ab7030d6e5
commit b894f9949e

View file

@ -128,7 +128,8 @@ RefPtr<MozPromise<bool, bool, false>> LockScreenOrientation(
}
}
default:
return nullptr;
NS_WARNING("Unsupported screen orientation type");
return MozPromise<bool, bool, false>::CreateAndReject(false, __func__);
}
}