From 7fb7be80ac27da93cea138a14ae64476bb56030c Mon Sep 17 00:00:00 2001 From: Ben Kelly Date: Tue, 12 Dec 2017 15:44:47 -0500 Subject: [PATCH] Bug 1293277 P3 Remove the dom.serviceWorkers.openWindow.enabled pref. r=baku --- browser/app/profile/firefox.js | 1 - dom/webidl/Clients.webidl | 3 +-- dom/workers/WorkerPrefs.h | 1 - dom/workers/WorkerScope.cpp | 9 --------- dom/workers/WorkerScope.h | 3 --- mobile/android/app/mobile.js | 1 - 6 files changed, 1 insertion(+), 17 deletions(-) diff --git a/browser/app/profile/firefox.js b/browser/app/profile/firefox.js index cd5bfa5c205e..5b502e9893e6 100644 --- a/browser/app/profile/firefox.js +++ b/browser/app/profile/firefox.js @@ -1626,7 +1626,6 @@ pref("reader.errors.includeURLs", true); pref("view_source.tab", true); pref("dom.serviceWorkers.enabled", true); -pref("dom.serviceWorkers.openWindow.enabled", true); // Enable Push API. pref("dom.push.enabled", true); diff --git a/dom/webidl/Clients.webidl b/dom/webidl/Clients.webidl index cac144ba97fa..054ee0e51041 100644 --- a/dom/webidl/Clients.webidl +++ b/dom/webidl/Clients.webidl @@ -15,8 +15,7 @@ interface Clients { Promise get(DOMString id); [NewObject] Promise> matchAll(optional ClientQueryOptions options); - [NewObject, - Func="mozilla::dom::ServiceWorkerGlobalScope::OpenWindowEnabled"] + [NewObject] Promise openWindow(USVString url); [NewObject] Promise claim(); diff --git a/dom/workers/WorkerPrefs.h b/dom/workers/WorkerPrefs.h index e1d8fb2f5f98..1fcaaa07a528 100644 --- a/dom/workers/WorkerPrefs.h +++ b/dom/workers/WorkerPrefs.h @@ -33,7 +33,6 @@ WORKER_SIMPLE_PREF("dom.webnotifications.serviceworker.enabled", DOMServiceWorke WORKER_SIMPLE_PREF("dom.webnotifications.requireinteraction.enabled", DOMWorkerNotificationRIEnabled, DOM_WORKERNOTIFICATIONRI) WORKER_SIMPLE_PREF("dom.serviceWorkers.enabled", ServiceWorkersEnabled, SERVICEWORKERS_ENABLED) WORKER_SIMPLE_PREF("dom.serviceWorkers.testing.enabled", ServiceWorkersTestingEnabled, SERVICEWORKERS_TESTING_ENABLED) -WORKER_SIMPLE_PREF("dom.serviceWorkers.openWindow.enabled", OpenWindowEnabled, OPEN_WINDOW_ENABLED) WORKER_SIMPLE_PREF("dom.storageManager.enabled", StorageManagerEnabled, STORAGEMANAGER_ENABLED) WORKER_SIMPLE_PREF("dom.promise_rejection_events.enabled", PromiseRejectionEventsEnabled, PROMISE_REJECTION_EVENTS_ENABLED) WORKER_SIMPLE_PREF("dom.push.enabled", PushEnabled, PUSH_ENABLED) diff --git a/dom/workers/WorkerScope.cpp b/dom/workers/WorkerScope.cpp index ea30a4f7247e..f1076a0be760 100644 --- a/dom/workers/WorkerScope.cpp +++ b/dom/workers/WorkerScope.cpp @@ -848,15 +848,6 @@ ServiceWorkerGlobalScope::SkipWaiting(ErrorResult& aRv) return promise.forget(); } -bool -ServiceWorkerGlobalScope::OpenWindowEnabled(JSContext* aCx, JSObject* aObj) -{ - WorkerPrivate* worker = GetCurrentThreadWorkerPrivate(); - MOZ_ASSERT(worker); - worker->AssertIsOnWorkerThread(); - return worker->OpenWindowEnabled(); -} - WorkerDebuggerGlobalScope::WorkerDebuggerGlobalScope( WorkerPrivate* aWorkerPrivate) : mWorkerPrivate(aWorkerPrivate) diff --git a/dom/workers/WorkerScope.h b/dom/workers/WorkerScope.h index a00b3c2f5e6a..686689d831e2 100644 --- a/dom/workers/WorkerScope.h +++ b/dom/workers/WorkerScope.h @@ -300,9 +300,6 @@ public: WrapGlobalObject(JSContext* aCx, JS::MutableHandle aReflector) override; - static bool - OpenWindowEnabled(JSContext* aCx, JSObject* aObj); - void GetScope(nsString& aScope) const { diff --git a/mobile/android/app/mobile.js b/mobile/android/app/mobile.js index 6e2870be782b..d41732ea5957 100644 --- a/mobile/android/app/mobile.js +++ b/mobile/android/app/mobile.js @@ -851,7 +851,6 @@ pref("browser.tabs.showAudioPlayingIcon", true); pref("dom.serviceWorkers.enabled", true); pref("dom.serviceWorkers.interception.enabled", true); -pref("dom.serviceWorkers.openWindow.enabled", true); // Allow service workers to open windows for a longer period after a notification // click on mobile. This is to account for some devices being quite slow.