Bug 1589913 - Update FxR Desktop default home page r=imanol,rbarker
☠☠ backed out by b2b44c7deadb ☠ ☠
authorthomasmo <thomasmo@mozilla.com>
Thu, 31 Oct 2019 19:08:38 +0000
changeset 500103 e8ee20fdf6ac6b464dfe75644073fbed9457a08b
parent 500102 050162995d2aa173e963b19aa7868d82c126c08d
child 500104 5a5de28bca602639e879c412e88123ae547ea2d2
push id99400
push usertmoore@mozilla.com
push dateFri, 01 Nov 2019 07:05:08 +0000
treeherderautoland@e8ee20fdf6ac [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersimanol, rbarker
bugs1589913
milestone72.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 1589913 - Update FxR Desktop default home page r=imanol,rbarker Fix crash on Android Differential Revision: https://phabricator.services.mozilla.com/D51289
dom/base/Navigator.cpp
--- a/dom/base/Navigator.cpp
+++ b/dom/base/Navigator.cpp
@@ -1397,17 +1397,18 @@ Promise* Navigator::Share(const ShareDat
     text.Assign(NS_ConvertUTF16toUTF8(aData.mText.Value()));
   } else {
     text.SetIsVoid(true);
   }
 
   // The spec does the "triggered by user activation" after the data checks.
   // Unfortunately, both Chrome and Safari behave this way, so interop wins.
   // https://github.com/w3c/web-share/pull/118
-  if (StaticPrefs::dom_webshare_requireinteraction() && !UserActivation::IsHandlingUserInput()) {
+  if (StaticPrefs::dom_webshare_requireinteraction() &&
+      !UserActivation::IsHandlingUserInput()) {
     NS_WARNING("Attempt to share not triggered by user activation");
     aRv.Throw(NS_ERROR_DOM_NOT_ALLOWED_ERR);
     return nullptr;
   }
 
   // Let mSharePromise be a new promise.
   mSharePromise = Promise::Create(mWindow->AsGlobal(), aRv);
   if (aRv.Failed()) {
@@ -1481,46 +1482,50 @@ already_AddRefed<Promise> Navigator::Get
   }
 
   RefPtr<Promise> p = Promise::Create(mWindow->AsGlobal(), aRv);
   if (aRv.Failed()) {
     return nullptr;
   }
 
   RefPtr<Navigator> self(this);
+#ifndef MOZ_WIDGET_ANDROID
   RefPtr<BrowserChild> browser(BrowserChild::GetFrom(mWindow));
   int browserID = browser->ChromeOuterWindowID();
 
   browser->SendIsWindowSupportingWebVR(browserID)->Then(
       GetCurrentThreadSerialEventTarget(), __func__,
       [self, p](bool isSupportedLambda) {
         if (isSupportedLambda) {
+#endif
           nsGlobalWindowInner* win = nsGlobalWindowInner::Cast(self->mWindow);
           win->NotifyVREventListenerAdded();
           // We pass mWindow's id to RefreshVRDisplays, so
           // NotifyVRDisplaysUpdated will be called asynchronously, resolving
           // the promises in mVRGetDisplaysPromises.
           if (!VRDisplay::RefreshVRDisplays(win->WindowID())) {
             // Failed to refresh, reject the promise now
             p->MaybeReject(NS_ERROR_FAILURE);
           } else {
             // Succeeded, so cache the promise to resolve later
 
             self->mVRGetDisplaysPromises.AppendElement(p);
           }
+#ifndef MOZ_WIDGET_ANDROID
         } else {
           // WebVR in this window is not supported, so resolve the promise
           // with no displays available
           nsTArray<RefPtr<VRDisplay>> vrDisplaysEmpty;
           p->MaybeResolve(vrDisplaysEmpty);
         }
       },
       [](const mozilla::ipc::ResponseRejectReason) {
         MOZ_CRASH("Failed to make IPC call to IsWindowSupportingWebVR");
       });
+#endif
 
   return p.forget();
 }
 
 void Navigator::GetActiveVRDisplays(
     nsTArray<RefPtr<VRDisplay>>& aDisplays) const {
   /**
    * Get only the active VR displays.