Skip to content
This repository was archived by the owner on Jul 9, 2025. It is now read-only.

Commit f5d5107

Browse files
committed
Bug 1589913 - Update FxR Desktop default home page r=imanol,rbarker
Fix crash on Android Differential Revision: https://phabricator.services.mozilla.com/D51289 --HG-- extra : moz-landing-system : lando
1 parent 7483f82 commit f5d5107

1 file changed

Lines changed: 6 additions & 1 deletion

File tree

dom/base/Navigator.cpp

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1402,7 +1402,8 @@ Promise* Navigator::Share(const ShareData& aData, ErrorResult& aRv) {
14021402
// The spec does the "triggered by user activation" after the data checks.
14031403
// Unfortunately, both Chrome and Safari behave this way, so interop wins.
14041404
// https://github.com/w3c/web-share/pull/118
1405-
if (StaticPrefs::dom_webshare_requireinteraction() && !UserActivation::IsHandlingUserInput()) {
1405+
if (StaticPrefs::dom_webshare_requireinteraction() &&
1406+
!UserActivation::IsHandlingUserInput()) {
14061407
NS_WARNING("Attempt to share not triggered by user activation");
14071408
aRv.Throw(NS_ERROR_DOM_NOT_ALLOWED_ERR);
14081409
return nullptr;
@@ -1486,13 +1487,15 @@ already_AddRefed<Promise> Navigator::GetVRDisplays(ErrorResult& aRv) {
14861487
}
14871488

14881489
RefPtr<Navigator> self(this);
1490+
#ifndef MOZ_WIDGET_ANDROID
14891491
RefPtr<BrowserChild> browser(BrowserChild::GetFrom(mWindow));
14901492
int browserID = browser->ChromeOuterWindowID();
14911493

14921494
browser->SendIsWindowSupportingWebVR(browserID)->Then(
14931495
GetCurrentThreadSerialEventTarget(), __func__,
14941496
[self, p](bool isSupportedLambda) {
14951497
if (isSupportedLambda) {
1498+
#endif
14961499
nsGlobalWindowInner* win = nsGlobalWindowInner::Cast(self->mWindow);
14971500
win->NotifyVREventListenerAdded();
14981501
// We pass mWindow's id to RefreshVRDisplays, so
@@ -1506,6 +1509,7 @@ already_AddRefed<Promise> Navigator::GetVRDisplays(ErrorResult& aRv) {
15061509

15071510
self->mVRGetDisplaysPromises.AppendElement(p);
15081511
}
1512+
#ifndef MOZ_WIDGET_ANDROID
15091513
} else {
15101514
// WebVR in this window is not supported, so resolve the promise
15111515
// with no displays available
@@ -1516,6 +1520,7 @@ already_AddRefed<Promise> Navigator::GetVRDisplays(ErrorResult& aRv) {
15161520
[](const mozilla::ipc::ResponseRejectReason) {
15171521
MOZ_CRASH("Failed to make IPC call to IsWindowSupportingWebVR");
15181522
});
1523+
#endif
15191524

15201525
return p.forget();
15211526
}

0 commit comments

Comments
 (0)