summaryrefslogtreecommitdiff
path: root/dom/workers
diff options
context:
space:
mode:
authorMoonchild <moonchild@palemoon.org>2021-03-11 06:43:10 +0000
committerMoonchild <moonchild@palemoon.org>2021-03-11 06:43:10 +0000
commitcc8a7e3f7b7d40967d2dd537b6343c87ba9138c7 (patch)
treebe5418a62494a956557ac0e769773ed2d558fdde /dom/workers
parentdce8a3300b191eeebee6f15f3f6e0f5a12a177b1 (diff)
downloaduxp-cc8a7e3f7b7d40967d2dd537b6343c87ba9138c7.tar.gz
Issue #1053 - Remove MOZ_WIDGET_ANDROID and IDB_MOBILE
Diffstat (limited to 'dom/workers')
-rw-r--r--dom/workers/ServiceWorkerClients.cpp48
1 files changed, 0 insertions, 48 deletions
diff --git a/dom/workers/ServiceWorkerClients.cpp b/dom/workers/ServiceWorkerClients.cpp
index f7f35919cd..78a4825654 100644
--- a/dom/workers/ServiceWorkerClients.cpp
+++ b/dom/workers/ServiceWorkerClients.cpp
@@ -32,10 +32,6 @@
#include "nsWindowWatcher.h"
#include "nsWeakReference.h"
-#ifdef MOZ_WIDGET_ANDROID
-#include "AndroidBridge.h"
-#endif
-
using namespace mozilla;
using namespace mozilla::dom;
using namespace mozilla::dom::workers;
@@ -512,12 +508,6 @@ public:
return NS_OK;
}
-#ifdef MOZ_WIDGET_ANDROID
- // This fires an intent that will start launching Fennec and foreground it,
- // if necessary.
- java::GeckoAppShell::OpenWindowForNotification();
-#endif
-
nsCOMPtr<nsPIDOMWindowOuter> window;
nsresult rv = OpenWindow(getter_AddRefs(window));
if (NS_SUCCEEDED(rv)) {
@@ -573,44 +563,6 @@ public:
MOZ_ASSERT(NS_SUCCEEDED(rv));
return NS_OK;
}
-#ifdef MOZ_WIDGET_ANDROID
- else if (rv == NS_ERROR_NOT_AVAILABLE) {
- // We couldn't get a browser window, so Fennec must not be running.
- // Send an Intent to launch Fennec and wait for "BrowserChrome:Ready"
- // to try opening a window again.
- nsCOMPtr<nsIObserverService> os = services::GetObserverService();
- NS_ENSURE_STATE(os);
-
- WorkerPrivate* workerPrivate = mPromiseProxy->GetWorkerPrivate();
- MOZ_ASSERT(workerPrivate);
-
- RefPtr<ServiceWorkerManager> swm = ServiceWorkerManager::GetInstance();
- if (!swm) {
- // browser shutdown
- return NS_ERROR_FAILURE;
- }
-
- nsCOMPtr<nsIPrincipal> principal = workerPrivate->GetPrincipal();
- MOZ_ASSERT(principal);
-
- RefPtr<ServiceWorkerRegistrationInfo> registration =
- swm->GetRegistration(principal, NS_ConvertUTF16toUTF8(mScope));
- if (NS_WARN_IF(!registration)) {
- return NS_ERROR_FAILURE;
- }
-
- RefPtr<ServiceWorkerInfo> serviceWorkerInfo =
- registration->GetServiceWorkerInfoById(workerPrivate->ServiceWorkerID());
- if (NS_WARN_IF(!serviceWorkerInfo)) {
- return NS_ERROR_FAILURE;
- }
-
- os->AddObserver(static_cast<nsIObserver*>(serviceWorkerInfo->WorkerPrivate()),
- "BrowserChrome:Ready", true);
- serviceWorkerInfo->WorkerPrivate()->AddPendingWindow(this);
- return NS_OK;
- }
-#endif
RefPtr<ResolveOpenWindowRunnable> resolveRunnable =
new ResolveOpenWindowRunnable(mPromiseProxy, nullptr, rv);