Bug 1251875 - Part 2: Remove the dom.serviceWorkers.interception.opaque.enabled pref; r=bkelly

This commit is contained in:
Ehsan Akhgari 2016-02-29 20:19:58 -05:00
parent a67a5febad
commit c7c449cf12
11 changed files with 2 additions and 24 deletions

View File

@ -173,8 +173,6 @@ WebrtcDeprecatedPrefixWarning=WebRTC interfaces with the "moz" prefix (mozRTCPee
NavigatorGetUserMediaWarning=navigator.mozGetUserMedia has been replaced by navigator.mediaDevices.getUserMedia
# LOCALIZATION NOTE: Do not translate "ServiceWorker". %S is a URL.
InterceptionFailedWithURL=Failed to load '%S'. A ServiceWorker intercepted the request and encountered an unexpected error.
# LOCALIZATION NOTE: Do not translate "ServiceWorker", "FetchEvent.respondWith()", "opaque", or "Response". %S is a URL.
OpaqueInterceptionDisabledWithURL=Failed to load '%S'. A ServiceWorker passed an opaque Response to FetchEvent.respondWith() while opaque interception is disabled.
# LOCALIZATION NOTE: Do not translate "ServiceWorker", "FetchEvent.respondWith()", "FetchEvent", "no-cors", "opaque", "Response", or "RequestMode". %1$S is a URL. %2$S is a RequestMode value.
BadOpaqueInterceptionRequestModeWithURL=Failed to load '%1$S'. A ServiceWorker passed an opaque Response to FetchEvent.respondWith() while handling a '%2$S' FetchEvent. Opaque Response objects are only valid when the RequestMode is 'no-cors'.
# LOCALIZATION NOTE: Do not translate "ServiceWorker", "Error", "Response", "FetchEvent.respondWith()", or "fetch()". %S is a URL.

View File

@ -12,7 +12,6 @@ function testScript(script) {
SpecialPowers.pushPrefEnv({
"set": [["dom.requestcache.enabled", true],
["dom.serviceWorkers.enabled", true],
["dom.serviceWorkers.interception.opaque.enabled", true],
["dom.serviceWorkers.testing.enabled", true],
["dom.serviceWorkers.exemptFromPerDomainMax", true]]
}, function() {

View File

@ -554,15 +554,6 @@ RespondWithHandler::ResolvedCallback(JSContext* aCx, JS::Handle<JS::Value> aValu
MOZ_ASSERT(worker);
worker->AssertIsOnWorkerThread();
// Allow opaque response interception to be disabled until we can ensure the
// security implications are not a complete disaster.
if (response->Type() == ResponseType::Opaque &&
!worker->OpaqueInterceptionEnabled()) {
autoCancel.SetCancelMessage(
NS_LITERAL_CSTRING("OpaqueInterceptionDisabledWithURL"), mRequestURL);
return;
}
// Section "HTTP Fetch", step 2.2:
// If one of the following conditions is true, return a network error:
// * response's type is "error".

View File

@ -31,7 +31,6 @@ WORKER_SIMPLE_PREF("dom.webnotifications.enabled", DOMWorkerNotificationEnabled,
WORKER_SIMPLE_PREF("dom.webnotifications.serviceworker.enabled", DOMServiceWorkerNotificationEnabled, DOM_SERVICEWORKERNOTIFICATION)
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.interception.opaque.enabled", OpaqueInterceptionEnabled, INTERCEPTION_OPAQUE_ENABLED)
WORKER_SIMPLE_PREF("dom.serviceWorkers.openWindow.enabled", OpenWindowEnabled, OPEN_WINDOW_ENABLED)
WORKER_SIMPLE_PREF("dom.push.enabled", PushEnabled, PUSH_ENABLED)
WORKER_SIMPLE_PREF("dom.requestcache.enabled", RequestCacheEnabled, REQUESTCACHE_ENABLED)

View File

@ -95,7 +95,6 @@
["dom.serviceWorkers.exemptFromPerDomainMax", true],
["dom.serviceWorkers.enabled", true],
["dom.serviceWorkers.testing.enabled", true],
["dom.serviceWorkers.interception.opaque.enabled", true],
["dom.caches.enabled", true],
]}, runTest);
</script>

View File

@ -73,7 +73,6 @@
SimpleTest.waitForExplicitFinish();
SpecialPowers.pushPrefEnv({"set": [
["dom.serviceWorkers.exemptFromPerDomainMax", true],
["dom.serviceWorkers.interception.opaque.enabled", true],
["dom.serviceWorkers.enabled", true],
["dom.serviceWorkers.testing.enabled", true],
]}, runTest);

View File

@ -68,7 +68,6 @@
SpecialPowers.pushPrefEnv({"set": [
["dom.requestcontext.enabled", true],
["dom.serviceWorkers.exemptFromPerDomainMax", true],
["dom.serviceWorkers.interception.opaque.enabled", true],
["dom.serviceWorkers.enabled", true],
["dom.serviceWorkers.testing.enabled", true],
]}, runTest);

View File

@ -77,7 +77,6 @@
["dom.serviceWorkers.exemptFromPerDomainMax", true],
["dom.serviceWorkers.enabled", true],
["dom.serviceWorkers.testing.enabled", true],
["dom.serviceWorkers.interception.opaque.enabled", true],
["dom.caches.enabled", true],
]}, runTest);
</script>

View File

@ -143,9 +143,6 @@ pref("dom.workers.maxPerDomain", 50);
pref("dom.serviceWorkers.enabled", false);
// Allow service workers to intercept opaque (cross origin) responses
pref("dom.serviceWorkers.interception.opaque.enabled", true);
// The amount of time (milliseconds) service workers keep running after each event.
pref("dom.serviceWorkers.idle_timeout", 30000);

View File

@ -1,2 +1 @@
prefs: [dom.serviceWorkers.enabled: true,
dom.serviceWorkers.interception.opaque.enabled: true]
prefs: [dom.serviceWorkers.enabled:true]

View File

@ -1,2 +1 @@
prefs: [dom.serviceWorkers.enabled: true,
dom.serviceWorkers.interception.opaque.enabled: true]
prefs: [dom.serviceWorkers.enabled:true]