Bug 1148935 - Correctly reflect worker and sharedworker RequestContext values; r=smaug

This commit is contained in:
Ehsan Akhgari
2015-06-16 21:21:08 -04:00
parent 7ff9b38a46
commit 091092faac
17 changed files with 154 additions and 16 deletions

View File

@@ -107,10 +107,13 @@ public:
return rv;
}
// Note that because there is no "serviceworker" RequestContext type, we can
// use the external TYPE_SCRIPT content policy types when loading a service
// worker.
rv = NS_NewChannel(getter_AddRefs(mChannel),
uri, aPrincipal,
nsILoadInfo::SEC_NORMAL,
nsIContentPolicy::TYPE_SCRIPT, // FIXME(nsm): TYPE_SERVICEWORKER
nsIContentPolicy::TYPE_SCRIPT,
loadGroup);
if (NS_WARN_IF(NS_FAILED(rv))) {
return rv;