Backed out 15 changesets (bug 1247687) as requested by dev CLOSED TREE

Backed out changeset 81d052cabf84 (bug 1247687)
Backed out changeset d698041e5174 (bug 1247687)
Backed out changeset 2adf67f910e8 (bug 1247687)
Backed out changeset 0bc871906e97 (bug 1247687)
Backed out changeset 1700d5b79273 (bug 1247687)
Backed out changeset 31888ffde37a (bug 1247687)
Backed out changeset 9153182c650d (bug 1247687)
Backed out changeset 45de9ffeec19 (bug 1247687)
Backed out changeset 59207e959b7c (bug 1247687)
Backed out changeset 49f18430c465 (bug 1247687)
Backed out changeset 0ae1fd421d4f (bug 1247687)
Backed out changeset 7770ec4717fd (bug 1247687)
Backed out changeset 68b476066248 (bug 1247687)
Backed out changeset c94a9dc60dff (bug 1247687)
Backed out changeset 0ab366c6eaaf (bug 1247687)
This commit is contained in:
Norisz Fay 2022-12-21 10:48:15 +02:00
Родитель 980244d030
Коммит 8cf029b070
147 изменённых файлов: 1161 добавлений и 2266 удалений

Просмотреть файл

@ -144,10 +144,8 @@ inline const char* NS_CP_ContentTypeName(nsContentPolicyType contentType) {
CASE_RETURN(TYPE_INTERNAL_FRAME_MESSAGEMANAGER_SCRIPT);
CASE_RETURN(TYPE_INTERNAL_FETCH_PRELOAD);
CASE_RETURN(TYPE_UA_FONT);
CASE_RETURN(TYPE_INTERNAL_WORKER_STATIC_MODULE);
CASE_RETURN(TYPE_PROXIED_WEBRTC_MEDIA);
CASE_RETURN(TYPE_WEB_IDENTITY);
CASE_RETURN(TYPE_END);
case nsIContentPolicy::TYPE_INVALID:
break;
// Do not add default: so that compilers can catch the missing case.

Просмотреть файл

@ -3498,7 +3498,6 @@ nsContentUtils::InternalContentPolicyTypeToExternal(nsContentPolicyType aType) {
case nsIContentPolicy::TYPE_INTERNAL_SHARED_WORKER:
case nsIContentPolicy::TYPE_INTERNAL_SERVICE_WORKER:
case nsIContentPolicy::TYPE_INTERNAL_WORKER_IMPORT_SCRIPTS:
case nsIContentPolicy::TYPE_INTERNAL_WORKER_STATIC_MODULE:
case nsIContentPolicy::TYPE_INTERNAL_AUDIOWORKLET:
case nsIContentPolicy::TYPE_INTERNAL_PAINTWORKLET:
case nsIContentPolicy::TYPE_INTERNAL_CHROMEUTILS_COMPILED_SCRIPT:

Просмотреть файл

@ -433,20 +433,6 @@ interface nsIContentPolicy : nsISupports
*/
TYPE_WEB_IDENTITY = 57,
/**
* Indicates the load of a static module on workers.
*/
TYPE_INTERNAL_WORKER_STATIC_MODULE = 58,
/**
* Used to indicate the end of this list, not a content policy. If you want
* to add a new content policy type, place it before this sentinel value
* TYPE_END, have it use TYPE_END's current value, and increment TYPE_END by
* one. (TYPE_END should always have the highest numerical value.)
*/
TYPE_END = 59,
/* When adding new content types, please update
* NS_CP_ContentTypeName, nsCSPContext, CSP_ContentTypeToDirective,
* DoContentSecurityChecks, all nsIContentPolicy implementations, the

4
dom/cache/DBSchema.cpp поставляемый
Просмотреть файл

@ -342,9 +342,7 @@ static_assert(
nsIContentPolicy::TYPE_INTERNAL_FRAME_MESSAGEMANAGER_SCRIPT == 53 &&
nsIContentPolicy::TYPE_INTERNAL_FETCH_PRELOAD == 54 &&
nsIContentPolicy::TYPE_UA_FONT == 55 &&
nsIContentPolicy::TYPE_WEB_IDENTITY == 57 &&
nsIContentPolicy::TYPE_INTERNAL_WORKER_STATIC_MODULE == 58 &&
nsIContentPolicy::TYPE_END == 59,
nsIContentPolicy::TYPE_WEB_IDENTITY == 57,
"nsContentPolicyType values are as expected");
namespace {

Просмотреть файл

@ -229,7 +229,6 @@ RequestDestination InternalRequest::MapContentPolicyTypeToRequestDestination(
case nsIContentPolicy::TYPE_SCRIPT:
return RequestDestination::Script;
case nsIContentPolicy::TYPE_INTERNAL_WORKER:
case nsIContentPolicy::TYPE_INTERNAL_WORKER_STATIC_MODULE:
return RequestDestination::Worker;
case nsIContentPolicy::TYPE_INTERNAL_SHARED_WORKER:
return RequestDestination::Sharedworker;
@ -306,7 +305,6 @@ RequestDestination InternalRequest::MapContentPolicyTypeToRequestDestination(
case nsIContentPolicy::TYPE_WEB_IDENTITY:
return RequestDestination::_empty;
case nsIContentPolicy::TYPE_INVALID:
case nsIContentPolicy::TYPE_END:
break;
// Do not add default: so that compilers can catch the missing case.
}

Просмотреть файл

@ -69,7 +69,7 @@ namespace dom {
* | TYPE_STYLESHEET
* "track" | TYPE_INTERNAL_TRACK
* "video" | TYPE_INTERNAL_VIDEO
* "worker" | TYPE_INTERNAL_WORKER, TYPE_INTERNAL_WORKER_STATIC_MODULE
* "worker" | TYPE_INTERNAL_WORKER
* "xslt" | TYPE_XSLT
* "" | Default for everything else.
*

Просмотреть файл

@ -31,7 +31,6 @@ nsCString MapInternalContentPolicyTypeToDest(nsContentPolicyType aType) {
case nsIContentPolicy::TYPE_SCRIPT:
return "script"_ns;
case nsIContentPolicy::TYPE_INTERNAL_WORKER:
case nsIContentPolicy::TYPE_INTERNAL_WORKER_STATIC_MODULE:
return "worker"_ns;
case nsIContentPolicy::TYPE_INTERNAL_SHARED_WORKER:
return "sharedworker"_ns;
@ -109,7 +108,6 @@ nsCString MapInternalContentPolicyTypeToDest(nsContentPolicyType aType) {
return "empty"_ns;
case nsIContentPolicy::TYPE_WEB_IDENTITY:
return "webidentity"_ns;
case nsIContentPolicy::TYPE_END:
case nsIContentPolicy::TYPE_INVALID:
break;
// Do not add default: so that compilers can catch the missing case.

Просмотреть файл

@ -304,7 +304,6 @@ CSPDirective CSP_ContentTypeToDirective(nsContentPolicyType aType) {
return nsIContentSecurityPolicy::WEB_MANIFEST_SRC_DIRECTIVE;
case nsIContentPolicy::TYPE_INTERNAL_WORKER:
case nsIContentPolicy::TYPE_INTERNAL_WORKER_STATIC_MODULE:
case nsIContentPolicy::TYPE_INTERNAL_SHARED_WORKER:
case nsIContentPolicy::TYPE_INTERNAL_SERVICE_WORKER:
return nsIContentSecurityPolicy::WORKER_SRC_DIRECTIVE;
@ -354,7 +353,6 @@ CSPDirective CSP_ContentTypeToDirective(nsContentPolicyType aType) {
// Fall through to error for all other directives
// Note that we should never end up here for navigate-to
case nsIContentPolicy::TYPE_INVALID:
case nsIContentPolicy::TYPE_END:
MOZ_ASSERT(false, "Can not map nsContentPolicyType to CSPDirective");
// Do not add default: so that compilers can catch the missing case.
}

Просмотреть файл

@ -443,8 +443,6 @@ nsresult nsMixedContentBlocker::ShouldLoad(bool aHadInsecureImageRedirect,
// external type in all cases right now.
bool isWorkerType =
internalContentType == nsIContentPolicy::TYPE_INTERNAL_WORKER ||
internalContentType ==
nsIContentPolicy::TYPE_INTERNAL_WORKER_STATIC_MODULE ||
internalContentType == nsIContentPolicy::TYPE_INTERNAL_SHARED_WORKER ||
internalContentType == nsIContentPolicy::TYPE_INTERNAL_SERVICE_WORKER;
ExtContentPolicyType contentType =

Просмотреть файл

@ -31,13 +31,11 @@ interface Worker : EventTarget {
Worker includes AbstractWorker;
dictionary WorkerOptions {
WorkerType type = "classic";
RequestCredentials credentials = "same-origin"; // credentials is only used if type is "module"
// WorkerType type = "classic"; TODO: Bug 1247687
// RequestCredentials credentials = "omit"; // credentials is only used if type is "module" TODO: Bug 1247687
DOMString name = "";
};
enum WorkerType { "classic", "module" };
[Func="mozilla::dom::ChromeWorker::WorkerAvailable",
Exposed=(Window,DedicatedWorker,SharedWorker)]
interface ChromeWorker : Worker {

Просмотреть файл

@ -20,9 +20,8 @@ already_AddRefed<ChromeWorker> ChromeWorker::Constructor(
JSContext* cx = aGlobal.Context();
RefPtr<WorkerPrivate> workerPrivate = WorkerPrivate::Constructor(
cx, aScriptURL, true /* aIsChromeWorker */, WorkerKindDedicated,
RequestCredentials::Omit, WorkerType::Classic, u""_ns, VoidCString(),
nullptr /*aLoadInfo */, aRv);
cx, aScriptURL, true /* aIsChromeWorker */, WorkerKindDedicated, u""_ns,
VoidCString(), nullptr /*aLoadInfo */, aRv);
if (NS_WARN_IF(aRv.Failed())) {
return nullptr;
}

Просмотреть файл

@ -34,7 +34,6 @@
#include "js/SourceText.h"
#include "nsError.h"
#include "nsComponentManagerUtils.h"
#include "nsContentSecurityManager.h"
#include "nsContentPolicyUtils.h"
#include "nsContentUtils.h"
#include "nsDocShellCID.h"
@ -110,8 +109,8 @@ nsresult ChannelFromScriptURL(
nsIScriptSecurityManager* secMan, nsIURI* aScriptURL,
const Maybe<ClientInfo>& aClientInfo,
const Maybe<ServiceWorkerDescriptor>& aController, bool aIsMainScript,
WorkerScriptType aWorkerScriptType, nsContentPolicyType aContentPolicyType,
nsLoadFlags aLoadFlags, uint32_t aSecFlags,
WorkerScriptType aWorkerScriptType,
nsContentPolicyType aMainScriptContentPolicyType, nsLoadFlags aLoadFlags,
nsICookieJarSettings* aCookieJarSettings, nsIReferrerInfo* aReferrerInfo,
nsIChannel** aChannel) {
AssertIsOnMainThread();
@ -119,13 +118,53 @@ nsresult ChannelFromScriptURL(
nsresult rv;
nsCOMPtr<nsIURI> uri = aScriptURL;
// Only use the document when its principal matches the principal of the
// current request. This means scripts fetched using the Workers' own
// principal won't inherit properties of the document, in particular the CSP.
// If we have the document, use it. Unfortunately, for dedicated workers
// 'parentDoc' ends up being the parent document, which is not the document
// that we want to use. So make sure to avoid using 'parentDoc' in that
// situation.
if (parentDoc && parentDoc->NodePrincipal() != principal) {
parentDoc = nullptr;
}
uint32_t secFlags =
aIsMainScript ? nsILoadInfo::SEC_REQUIRE_SAME_ORIGIN_DATA_IS_BLOCKED
: nsILoadInfo::SEC_ALLOW_CROSS_ORIGIN_INHERITS_SEC_CONTEXT;
bool inheritAttrs = nsContentUtils::ChannelShouldInheritPrincipal(
principal, uri, true /* aInheritForAboutBlank */,
false /* aForceInherit */);
bool isData = uri->SchemeIs("data");
if (inheritAttrs && !isData) {
secFlags |= nsILoadInfo::SEC_FORCE_INHERIT_PRINCIPAL;
}
if (aWorkerScriptType == DebuggerScript) {
// A DebuggerScript needs to be a local resource like chrome: or resource:
bool isUIResource = false;
rv = NS_URIChainHasFlags(uri, nsIProtocolHandler::URI_IS_UI_RESOURCE,
&isUIResource);
if (NS_WARN_IF(NS_FAILED(rv))) {
return rv;
}
if (!isUIResource) {
return NS_ERROR_DOM_SECURITY_ERR;
}
secFlags |= nsILoadInfo::SEC_ALLOW_CHROME;
}
// Note: this is for backwards compatibility and goes against spec.
// We should find a better solution.
if (aIsMainScript && isData) {
secFlags = nsILoadInfo::SEC_ALLOW_CROSS_ORIGIN_SEC_CONTEXT_IS_NULL;
}
nsContentPolicyType contentPolicyType =
aIsMainScript ? aMainScriptContentPolicyType
: nsIContentPolicy::TYPE_INTERNAL_WORKER_IMPORT_SCRIPTS;
// The main service worker script should never be loaded over the network
// in this path. It should always be offlined by ServiceWorkerScriptCache.
// We assert here since this error should also be caught by the runtime
@ -134,25 +173,19 @@ nsresult ChannelFromScriptURL(
// Note, if we ever allow service worker scripts to be loaded from network
// here we need to configure the channel properly. For example, it must
// not allow redirects.
MOZ_DIAGNOSTIC_ASSERT(aContentPolicyType !=
MOZ_DIAGNOSTIC_ASSERT(contentPolicyType !=
nsIContentPolicy::TYPE_INTERNAL_SERVICE_WORKER);
nsCOMPtr<nsIChannel> channel;
if (parentDoc) {
// This is the path for top level dedicated worker scripts with a document
rv = NS_NewChannel(getter_AddRefs(channel), uri, parentDoc, aSecFlags,
aContentPolicyType,
rv = NS_NewChannel(getter_AddRefs(channel), uri, parentDoc, secFlags,
contentPolicyType,
nullptr, // aPerformanceStorage
loadGroup,
nullptr, // aCallbacks
aLoadFlags, ios);
NS_ENSURE_SUCCESS(rv, NS_ERROR_DOM_SECURITY_ERR);
} else {
// This branch is used in the following cases:
// * Shared and ServiceWorkers (who do not have a doc)
// * Static Module Imports
// * ImportScripts
// We must have a loadGroup with a load context for the principal to
// traverse the channel correctly.
MOZ_ASSERT(loadGroup);
@ -166,16 +199,14 @@ nsresult ChannelFromScriptURL(
}
if (aClientInfo.isSome()) {
// If we have an existing clientInfo (true for all modules and
// importScripts), we will use this branch
rv = NS_NewChannel(getter_AddRefs(channel), uri, principal,
aClientInfo.ref(), aController, aSecFlags,
aContentPolicyType, aCookieJarSettings,
aClientInfo.ref(), aController, secFlags,
contentPolicyType, aCookieJarSettings,
performanceStorage, loadGroup, nullptr, // aCallbacks
aLoadFlags, ios);
} else {
rv = NS_NewChannel(getter_AddRefs(channel), uri, principal, aSecFlags,
aContentPolicyType, aCookieJarSettings,
rv = NS_NewChannel(getter_AddRefs(channel), uri, principal, secFlags,
contentPolicyType, aCookieJarSettings,
performanceStorage, loadGroup, nullptr, // aCallbacks
aLoadFlags, ios);
}
@ -227,24 +258,8 @@ void LoadAllScripts(WorkerPrivate* aWorkerPrivate,
return;
}
bool ok = loader->CreateScriptRequests(aScriptURLs, aDocumentEncoding,
aIsMainScript);
loader->CreateScriptRequests(aScriptURLs, aDocumentEncoding, aIsMainScript);
if (!ok) {
return;
}
if (aIsMainScript) {
// Module Load
RefPtr<JS::loader::ScriptLoadRequest> mainScript = loader->GetMainScript();
if (mainScript && mainScript->IsModuleRequest()) {
if (NS_FAILED(mainScript->AsModuleRequest()->StartModuleLoad())) {
return;
}
syncLoop.Run();
return;
}
}
if (loader->DispatchLoadScripts()) {
syncLoop.Run();
}
@ -330,88 +345,6 @@ class ChannelGetterRunnable final : public WorkerMainThreadRunnable {
virtual ~ChannelGetterRunnable() = default;
};
nsresult GetCommonSecFlags(bool aIsMainScript, nsIURI* uri,
nsIPrincipal* principal,
WorkerScriptType aWorkerScriptType,
uint32_t& secFlags) {
bool inheritAttrs = nsContentUtils::ChannelShouldInheritPrincipal(
principal, uri, true /* aInheritForAboutBlank */,
false /* aForceInherit */);
bool isData = uri->SchemeIs("data");
if (inheritAttrs && !isData) {
secFlags |= nsILoadInfo::SEC_FORCE_INHERIT_PRINCIPAL;
}
if (aWorkerScriptType == DebuggerScript) {
// A DebuggerScript needs to be a local resource like chrome: or resource:
bool isUIResource = false;
nsresult rv = NS_URIChainHasFlags(
uri, nsIProtocolHandler::URI_IS_UI_RESOURCE, &isUIResource);
if (NS_WARN_IF(NS_FAILED(rv))) {
return rv;
}
if (!isUIResource) {
return NS_ERROR_DOM_SECURITY_ERR;
}
secFlags |= nsILoadInfo::SEC_ALLOW_CHROME;
}
return NS_OK;
}
nsresult GetModuleSecFlags(nsIPrincipal* principal,
WorkerScriptType aWorkerScriptType,
ScriptLoadRequest* aRequest,
RequestCredentials aCredentials,
uint32_t& secFlags) {
// Implements "To fetch a single module script,"
// Step 9. If destination is "worker", "sharedworker", or "serviceworker",
// and the top-level module fetch flag is set, then set request's
// mode to "same-origin".
secFlags = aRequest->GetWorkerLoadContext()->IsTopLevel()
? nsILoadInfo::SEC_REQUIRE_SAME_ORIGIN_DATA_IS_BLOCKED
: nsILoadInfo::SEC_ALLOW_CROSS_ORIGIN_INHERITS_SEC_CONTEXT;
// Step 8. Let request be a new request whose [...] mode is "cors" [...]
// This implements the same Cookie settings as nsContentSecurityManager's
// ComputeSecurityFlags. The main difference is the line above, Step 9,
// setting to same origin.
if (aCredentials == RequestCredentials::Include) {
secFlags |= nsILoadInfo::nsILoadInfo::SEC_COOKIES_INCLUDE;
} else if (aCredentials == RequestCredentials::Same_origin) {
secFlags |= nsILoadInfo::nsILoadInfo::SEC_COOKIES_SAME_ORIGIN;
} else if (aCredentials == RequestCredentials::Omit) {
secFlags |= nsILoadInfo::nsILoadInfo::SEC_COOKIES_OMIT;
}
return GetCommonSecFlags(aRequest->GetWorkerLoadContext()->IsTopLevel(),
aRequest->mURI, principal, aWorkerScriptType,
secFlags);
}
nsresult GetClassicSecFlags(bool aIsMainScript, nsIURI* uri,
nsIPrincipal* principal,
WorkerScriptType aWorkerScriptType,
uint32_t& secFlags) {
secFlags = aIsMainScript
? nsILoadInfo::SEC_REQUIRE_SAME_ORIGIN_DATA_IS_BLOCKED
: nsILoadInfo::SEC_ALLOW_CROSS_ORIGIN_INHERITS_SEC_CONTEXT;
nsresult rv = GetCommonSecFlags(aIsMainScript, uri, principal,
aWorkerScriptType, secFlags);
bool isData = uri->SchemeIs("data");
// Note: this is for backwards compatibility and goes against spec.
// We should find a better solution.
if (aIsMainScript && isData) {
secFlags = nsILoadInfo::SEC_ALLOW_CROSS_ORIGIN_SEC_CONTEXT_IS_NULL;
}
return rv;
}
} // anonymous namespace
namespace loader {
@ -433,10 +366,6 @@ class ScriptExecutorRunnable final : public MainThreadWorkerSyncRunnable {
virtual bool PreRun(WorkerPrivate* aWorkerPrivate) override;
bool ProcessModuleScript(JSContext* aCx, WorkerPrivate* aWorkerPrivate);
bool ProcessClassicScripts(JSContext* aCx, WorkerPrivate* aWorkerPrivate);
virtual bool WorkerRun(JSContext* aCx,
WorkerPrivate* aWorkerPrivate) override;
@ -482,55 +411,18 @@ WorkerScriptLoader::WorkerScriptLoader(
}
nsIGlobalObject* global = GetGlobal();
mController = global->GetController();
// Set up the module loader, if it has not been yet.
// TODO: Implement this for classic scripts when dynamic imports are added.
if (aWorkerPrivate->WorkerType() == WorkerType::Module) {
InitModuleLoader();
}
}
ScriptLoadRequest* WorkerScriptLoader::GetMainScript() {
mWorkerRef->Private()->AssertIsOnWorkerThread();
ScriptLoadRequest* request = mLoadingRequests.getFirst();
if (request->GetWorkerLoadContext()->IsTopLevel()) {
return request;
}
return nullptr;
}
void WorkerScriptLoader::InitModuleLoader() {
mWorkerRef->Private()->AssertIsOnWorkerThread();
RefPtr<WorkerModuleLoader> moduleLoader =
new WorkerModuleLoader(this, GetGlobal(), mSyncLoopTarget.get());
static_cast<WorkerGlobalScopeBase*>(GetGlobal())
->InitModuleLoader(moduleLoader);
}
bool WorkerScriptLoader::CreateScriptRequests(
void WorkerScriptLoader::CreateScriptRequests(
const nsTArray<nsString>& aScriptURLs,
const mozilla::Encoding* aDocumentEncoding, bool aIsMainScript) {
mWorkerRef->Private()->AssertIsOnWorkerThread();
if (mWorkerRef->Private()->WorkerType() == WorkerType::Module &&
!aIsMainScript) {
// If a worker has been loaded as a module worker, ImportScripts calls are
// disallowed -- then the operation is invalid.
//
// 10.3.1 Importing scripts and libraries.
// Step 1. If worker global scope's type is "module", throw a TypeError
// exception.
mRv.ThrowTypeError(
"Using `ImportScripts` inside a Module Worker is "
"disallowed.");
return false;
}
for (const nsString& scriptURL : aScriptURLs) {
RefPtr<ScriptLoadRequest> request =
CreateScriptLoadRequest(scriptURL, aDocumentEncoding, aIsMainScript);
mLoadingRequests.AppendElement(request);
}
return true;
}
nsTArray<RefPtr<ThreadSafeRequestHandle>> WorkerScriptLoader::GetLoadingList() {
@ -545,30 +437,9 @@ nsTArray<RefPtr<ThreadSafeRequestHandle>> WorkerScriptLoader::GetLoadingList() {
return list;
}
nsContentPolicyType WorkerScriptLoader::GetContentPolicyType(
ScriptLoadRequest* aRequest) {
if (aRequest->GetWorkerLoadContext()->IsTopLevel()) {
// Implements https://html.spec.whatwg.org/#worker-processing-model
// Step 13: Let destination be "sharedworker" if is shared is true, and
// "worker" otherwise.
return mWorkerRef->Private()->ContentPolicyType();
}
if (aRequest->IsModuleRequest()) {
// Implements the destination for Step 14 in
// https://html.spec.whatwg.org/#worker-processing-model
//
// We need a special subresource type in order to correctly implement
// the graph fetch, where the destination is set to "worker" or
// "sharedworker".
return nsIContentPolicy::TYPE_INTERNAL_WORKER_STATIC_MODULE;
}
return nsIContentPolicy::TYPE_INTERNAL_WORKER_IMPORT_SCRIPTS;
}
already_AddRefed<ScriptLoadRequest> WorkerScriptLoader::CreateScriptLoadRequest(
const nsString& aScriptURL, const mozilla::Encoding* aDocumentEncoding,
bool aIsMainScript) {
mWorkerRef->Private()->AssertIsOnWorkerThread();
WorkerLoadContext::Kind kind =
WorkerLoadContext::GetKind(aIsMainScript, IsDebuggerScript());
@ -597,43 +468,10 @@ already_AddRefed<ScriptLoadRequest> WorkerScriptLoader::CreateScriptLoadRequest(
RefPtr<ScriptFetchOptions> fetchOptions =
new ScriptFetchOptions(CORSMode::CORS_NONE, referrerPolicy, nullptr);
RefPtr<ScriptLoadRequest> request = nullptr;
if (mWorkerRef->Private()->WorkerType() == WorkerType::Classic) {
request = new ScriptLoadRequest(ScriptKind::eClassic, uri, fetchOptions,
SRIMetadata(), nullptr, // mReferrer
loadContext);
} else {
// Implements part of "To fetch a worklet/module worker script graph"
// including, setting up the request with a credentials mode,
// destination.
// Step 1. Let options be a script fetch options.
// We currently don't track credentials in our ScriptFetchOptions
// implementation, so we are defaulting the fetchOptions object defined
// above. This behavior is handled fully in GetModuleSecFlags.
RefPtr<WorkerModuleLoader::ModuleLoaderBase> moduleLoader =
static_cast<WorkerGlobalScopeBase*>(GetGlobal())->GetModuleLoader();
// Implements the referrer for "To fetch a single module script"
// Our implementation does not have a "client" as a referrer.
// However, when client is resolved (per 8.3. Determine requests
// Referrer in
// https://w3c.github.io/webappsec-referrer-policy/#determine-requests-referrer)
// This should result in the referrer source being the creation URL.
//
// In subresource modules, the referrer is the importing script.
nsCOMPtr<nsIURI> referrer =
mWorkerRef->Private()->GetReferrerInfo()->GetOriginalReferrer();
// Part of Step 2. This sets the Top-level flag to true
request = new ModuleLoadRequest(
uri, fetchOptions, SRIMetadata(), referrer, loadContext,
true, /* is top level */
false, /* is dynamic import */
moduleLoader, ModuleLoadRequest::NewVisitedSetForTopLevelImport(uri),
nullptr);
}
RefPtr<ScriptLoadRequest> request =
new ScriptLoadRequest(ScriptKind::eClassic, uri, fetchOptions,
SRIMetadata(), nullptr, /* = aReferrer */
loadContext);
// Set the mURL, it will be used for error handling and debugging.
request->mURL = NS_ConvertUTF16toUTF8(aScriptURL);
@ -725,11 +563,7 @@ nsIGlobalObject* WorkerScriptLoader::GetGlobal() {
void WorkerScriptLoader::MaybeMoveToLoadedList(ScriptLoadRequest* aRequest) {
mWorkerRef->Private()->AssertIsOnWorkerThread();
// Only set to ready for regular scripts. Module loader will set the script to
// ready if it is a Module Request.
if (!aRequest->IsModuleRequest()) {
aRequest->SetReady();
}
aRequest->SetReady();
// If the request is not in a list, we are in an illegal state.
MOZ_RELEASE_ASSERT(aRequest->isInList());
@ -782,9 +616,7 @@ bool WorkerScriptLoader::ProcessPendingRequests(JSContext* aCx) {
MOZ_ASSERT(global);
while (!mLoadedRequests.isEmpty()) {
// Take a reference, but do not remove it from the list yet. There is a
// possibility that this will need to be cancelled.
RefPtr<ScriptLoadRequest> req = mLoadedRequests.getFirst();
RefPtr<ScriptLoadRequest> req = mLoadedRequests.StealFirst();
// We don't have a ProcessRequest method (like we do on the DOM), as there
// isn't much processing that we need to do per request that isn't related
// to evaluation (the processsing done for the DOM is handled in
@ -798,8 +630,6 @@ bool WorkerScriptLoader::ProcessPendingRequests(JSContext* aCx) {
mLoadedRequests.CancelRequestsAndClear();
break;
}
// remove the element from the list.
mLoadedRequests.Remove(req);
}
TryShutdown();
@ -876,38 +706,21 @@ nsresult WorkerScriptLoader::LoadScript(
}
if (!channel) {
nsCOMPtr<nsIReferrerInfo> referrerInfo;
uint32_t secFlags;
ScriptLoadRequest* request = aRequestHandle->GetRequest();
if (request->IsModuleRequest()) {
nsCOMPtr<nsIReferrerInfo> referrerInfo =
ReferrerInfo::CreateForFetch(principal, nullptr);
if (parentWorker && !loadContext->IsTopLevel()) {
referrerInfo =
new ReferrerInfo(request->mReferrer, request->ReferrerPolicy());
rv = GetModuleSecFlags(principal, mWorkerScriptType, request,
mWorkerRef->Private()->WorkerCredentials(),
secFlags);
} else {
referrerInfo = ReferrerInfo::CreateForFetch(principal, nullptr);
if (parentWorker && !loadContext->IsTopLevel()) {
referrerInfo =
static_cast<ReferrerInfo*>(referrerInfo.get())
->CloneWithNewPolicy(parentWorker->GetReferrerPolicy());
}
rv = GetClassicSecFlags(loadContext->IsTopLevel(), request->mURI,
principal, mWorkerScriptType, secFlags);
static_cast<ReferrerInfo*>(referrerInfo.get())
->CloneWithNewPolicy(parentWorker->GetReferrerPolicy());
}
if (NS_WARN_IF(NS_FAILED(rv))) {
return rv;
}
nsContentPolicyType contentPolicyType = GetContentPolicyType(request);
rv = ChannelFromScriptURL(
principal, parentDoc, mWorkerRef->Private(), loadGroup, ios, secMan,
request->mURI, loadContext->mClientInfo, mController,
loadContext->IsTopLevel(), mWorkerScriptType, contentPolicyType,
loadFlags, secFlags, mWorkerRef->Private()->CookieJarSettings(),
referrerInfo, getter_AddRefs(channel));
aRequestHandle->GetRequest()->mURI, loadContext->mClientInfo,
mController, loadContext->IsTopLevel(), mWorkerScriptType,
mWorkerRef->Private()->ContentPolicyType(), loadFlags,
mWorkerRef->Private()->CookieJarSettings(), referrerInfo,
getter_AddRefs(channel));
if (NS_WARN_IF(NS_FAILED(rv))) {
return rv;
}
@ -1052,25 +865,6 @@ bool WorkerScriptLoader::EvaluateScript(JSContext* aCx,
mWorkerRef->Private()->ExecutionReady();
}
if (aRequest->IsModuleRequest()) {
// Only the top level module of the module graph will be executed from here,
// the rest will be executed from SpiderMonkey as part of the execution of
// the module graph.
MOZ_ASSERT(aRequest->IsTopLevel());
ModuleLoadRequest* request = aRequest->AsModuleRequest();
if (!request->mModuleScript) {
return false;
}
// Implements To fetch a worklet/module worker script graph
// Step 5. Fetch the descendants of and link result.
if (!request->InstantiateModuleGraph()) {
return false;
}
nsresult rv = request->EvaluateModule();
return NS_SUCCEEDED(rv);
}
JS::CompileOptions options(aCx);
// The introduction script is used by the DOM script loader as a way
// to fill the Debugger Metadata for the JS Execution context. We don't use
@ -1101,9 +895,6 @@ bool WorkerScriptLoader::EvaluateScript(JSContext* aCx,
: EvaluateSourceBuffer(aCx, options,
maybeSource.ref<JS::SourceText<char16_t>>());
if (aRequest->IsCanceled()) {
return false;
}
if (!successfullyEvaluated) {
mRv.StealExceptionFromJSContext(aCx);
return false;
@ -1459,48 +1250,10 @@ bool ScriptExecutorRunnable::PreRun(WorkerPrivate* aWorkerPrivate) {
return mScriptLoader->StoreCSP();
}
bool ScriptExecutorRunnable::ProcessModuleScript(
JSContext* aCx, WorkerPrivate* aWorkerPrivate) {
// We should only ever have one script when processing modules
MOZ_ASSERT(mLoadedRequests.Length() == 1);
RefPtr<ScriptLoadRequest> request;
{
// There is a possibility that we cleaned up while this task was waiting to
// run. If this has happened, return and exit.
MutexAutoLock lock(mScriptLoader->CleanUpLock());
if (mScriptLoader->CleanedUp()) {
return true;
}
bool ScriptExecutorRunnable::WorkerRun(JSContext* aCx,
WorkerPrivate* aWorkerPrivate) {
aWorkerPrivate->AssertIsOnWorkerThread();
const auto& requestHandle = mLoadedRequests.begin()->get();
// The request must be valid.
MOZ_ASSERT(!requestHandle->IsEmpty());
// Release the request to the worker. From this point on, the Request Handle
// is empty.
request = requestHandle->ReleaseRequest();
// release lock. We will need it later if we cleanup.
}
MOZ_ASSERT(request->IsModuleRequest());
WorkerLoadContext* loadContext = request->GetWorkerLoadContext();
ModuleLoadRequest* moduleRequest = request->AsModuleRequest();
if (NS_FAILED(loadContext->mLoadResult)) {
if (!moduleRequest->IsTopLevel()) {
moduleRequest->Cancel();
} else {
moduleRequest->LoadFailed();
}
}
moduleRequest->OnFetchComplete(loadContext->mLoadResult);
return true;
}
bool ScriptExecutorRunnable::ProcessClassicScripts(
JSContext* aCx, WorkerPrivate* aWorkerPrivate) {
// There is a possibility that we cleaned up while this task was waiting to
// run. If this has happened, return and exit.
{
@ -1509,6 +1262,11 @@ bool ScriptExecutorRunnable::ProcessClassicScripts(
return true;
}
// We must be on the same worker as we started on.
MOZ_ASSERT(
mScriptLoader->mSyncLoopTarget == mSyncLoopTarget,
"Unexpected SyncLoopTarget. Check if the sync loop was closed early");
for (const auto& requestHandle : mLoadedRequests) {
// The request must be valid.
MOZ_ASSERT(!requestHandle->IsEmpty());
@ -1516,28 +1274,13 @@ bool ScriptExecutorRunnable::ProcessClassicScripts(
// Release the request to the worker. From this point on, the Request
// Handle is empty.
RefPtr<ScriptLoadRequest> request = requestHandle->ReleaseRequest();
mScriptLoader->MaybeMoveToLoadedList(request);
}
}
return mScriptLoader->ProcessPendingRequests(aCx);
}
bool ScriptExecutorRunnable::WorkerRun(JSContext* aCx,
WorkerPrivate* aWorkerPrivate) {
aWorkerPrivate->AssertIsOnWorkerThread();
// We must be on the same worker as we started on.
MOZ_ASSERT(
mScriptLoader->mSyncLoopTarget == mSyncLoopTarget,
"Unexpected SyncLoopTarget. Check if the sync loop was closed early");
if (aWorkerPrivate->WorkerType() == WorkerType::Module) {
return ProcessModuleScript(aCx, aWorkerPrivate);
}
return ProcessClassicScripts(aCx, aWorkerPrivate);
}
nsresult ScriptExecutorRunnable::Cancel() {
// We need to check first if cancel is called twice
nsresult rv = MainThreadWorkerSyncRunnable::Cancel();
@ -1564,18 +1307,11 @@ nsresult ChannelFromScriptURLMainThread(
nsIScriptSecurityManager* secMan = nsContentUtils::GetSecurityManager();
NS_ASSERTION(secMan, "This should never be null!");
uint32_t secFlags;
nsresult rv =
GetClassicSecFlags(true, aScriptURL, aPrincipal, WorkerScript, secFlags);
if (NS_FAILED(rv)) {
return rv;
}
return ChannelFromScriptURL(
aPrincipal, aParentDoc, nullptr, aLoadGroup, ios, secMan, aScriptURL,
aClientInfo, Maybe<ServiceWorkerDescriptor>(), true, WorkerScript,
aMainScriptContentPolicyType, nsIRequest::LOAD_NORMAL, secFlags,
aCookieJarSettings, aReferrerInfo, aChannel);
aMainScriptContentPolicyType, nsIRequest::LOAD_NORMAL, aCookieJarSettings,
aReferrerInfo, aChannel);
}
nsresult ChannelFromScriptURLWorkerThread(JSContext* aCx,

Просмотреть файл

@ -8,12 +8,10 @@
#define mozilla_dom_workers_scriptloader_h__
#include "js/loader/ScriptLoadRequest.h"
#include "js/loader/ModuleLoadRequest.h"
#include "js/loader/ModuleLoaderBase.h"
#include "mozilla/dom/WorkerCommon.h"
#include "mozilla/dom/WorkerLoadContext.h"
#include "mozilla/dom/WorkerRef.h"
#include "mozilla/dom/workerinternals/WorkerModuleLoader.h"
#include "mozilla/Maybe.h"
#include "nsIContentPolicy.h"
#include "nsStringFwd.h"
@ -143,7 +141,6 @@ class WorkerScriptLoader : public JS::loader::ScriptLoaderInterface,
friend class CacheLoadHandler;
friend class CacheCreator;
friend class NetworkLoadHandler;
friend class WorkerModuleLoader;
RefPtr<ThreadSafeWorkerRef> mWorkerRef;
UniquePtr<SerializedStackHolder> mOriginStack;
@ -187,12 +184,10 @@ class WorkerScriptLoader : public JS::loader::ScriptLoaderInterface,
nsISerialEventTarget* aSyncLoopTarget,
WorkerScriptType aWorkerScriptType, ErrorResult& aRv);
bool CreateScriptRequests(const nsTArray<nsString>& aScriptURLs,
void CreateScriptRequests(const nsTArray<nsString>& aScriptURLs,
const mozilla::Encoding* aDocumentEncoding,
bool aIsMainScript);
ScriptLoadRequest* GetMainScript();
already_AddRefed<ScriptLoadRequest> CreateScriptLoadRequest(
const nsString& aScriptURL, const mozilla::Encoding* aDocumentEncoding,
bool aIsMainScript);
@ -206,8 +201,6 @@ class WorkerScriptLoader : public JS::loader::ScriptLoaderInterface,
nsIURI* GetInitialBaseURI();
nsIGlobalObject* GetGlobal();
void MaybeMoveToLoadedList(ScriptLoadRequest* aRequest);
bool StoreCSP();
@ -239,13 +232,11 @@ class WorkerScriptLoader : public JS::loader::ScriptLoaderInterface,
return NS_OK;
}
void InitModuleLoader();
void TryShutdown();
nsTArray<RefPtr<ThreadSafeRequestHandle>> GetLoadingList();
nsContentPolicyType GetContentPolicyType(ScriptLoadRequest* aRequest);
nsIGlobalObject* GetGlobal();
bool EvaluateScript(JSContext* aCx, ScriptLoadRequest* aRequest);

Просмотреть файл

@ -42,8 +42,7 @@ already_AddRefed<Worker> Worker::Constructor(const GlobalObject& aGlobal,
RefPtr<WorkerPrivate> workerPrivate = WorkerPrivate::Constructor(
cx, aScriptURL, false /* aIsChromeWorker */, WorkerKindDedicated,
aOptions.mCredentials, aOptions.mType, aOptions.mName, VoidCString(),
nullptr /*aLoadInfo */, aRv);
aOptions.mName, VoidCString(), nullptr /*aLoadInfo */, aRv);
if (NS_WARN_IF(aRv.Failed())) {
return nullptr;
}

Просмотреть файл

@ -2294,8 +2294,7 @@ bool IsNewWorkerSecureContext(const WorkerPrivate* const aParent,
WorkerPrivate::WorkerPrivate(
WorkerPrivate* aParent, const nsAString& aScriptURL, bool aIsChromeWorker,
WorkerKind aWorkerKind, RequestCredentials aRequestCredentials,
enum WorkerType aWorkerType, const nsAString& aWorkerName,
WorkerKind aWorkerKind, const nsAString& aWorkerName,
const nsACString& aServiceWorkerScope, WorkerLoadInfo& aLoadInfo,
nsString&& aId, const nsID& aAgentClusterId,
const nsILoadInfo::CrossOriginOpenerPolicy aAgentClusterOpenerPolicy)
@ -2304,8 +2303,6 @@ WorkerPrivate::WorkerPrivate(
mParent(aParent),
mScriptURL(aScriptURL),
mWorkerName(aWorkerName),
mCredentialsMode(aRequestCredentials),
mWorkerType(aWorkerType), // If the worker runs as a script or a module
mWorkerKind(aWorkerKind),
mLoadInfo(std::move(aLoadInfo)),
mDebugger(nullptr),
@ -2541,22 +2538,10 @@ WorkerPrivate::ComputeAgentClusterIdAndCoop(WorkerPrivate* aParent,
return {nsID::GenerateUUID(), agentClusterCoop};
}
already_AddRefed<WorkerPrivate> WorkerPrivate::Constructor(
JSContext* aCx, const nsAString& aScriptURL, bool aIsChromeWorker,
WorkerKind aWorkerKind, const nsAString& aWorkerName,
const nsACString& aServiceWorkerScope, WorkerLoadInfo* aLoadInfo,
ErrorResult& aRv, nsString aId) {
return WorkerPrivate::Constructor(
aCx, aScriptURL, aIsChromeWorker, aWorkerKind, RequestCredentials::Omit,
WorkerType::Classic, aWorkerName, aServiceWorkerScope, aLoadInfo, aRv,
std::move(aId));
}
// static
already_AddRefed<WorkerPrivate> WorkerPrivate::Constructor(
JSContext* aCx, const nsAString& aScriptURL, bool aIsChromeWorker,
WorkerKind aWorkerKind, RequestCredentials aRequestCredentials,
enum WorkerType aWorkerType, const nsAString& aWorkerName,
WorkerKind aWorkerKind, const nsAString& aWorkerName,
const nsACString& aServiceWorkerScope, WorkerLoadInfo* aLoadInfo,
ErrorResult& aRv, nsString aId) {
WorkerPrivate* parent =
@ -2619,10 +2604,10 @@ already_AddRefed<WorkerPrivate> WorkerPrivate::Constructor(
AgentClusterIdAndCoop idAndCoop =
ComputeAgentClusterIdAndCoop(parent, aWorkerKind, aLoadInfo);
RefPtr<WorkerPrivate> worker = new WorkerPrivate(
parent, aScriptURL, aIsChromeWorker, aWorkerKind, aRequestCredentials,
aWorkerType, aWorkerName, aServiceWorkerScope, *aLoadInfo, std::move(aId),
idAndCoop.mId, idAndCoop.mCoop);
RefPtr<WorkerPrivate> worker =
new WorkerPrivate(parent, aScriptURL, aIsChromeWorker, aWorkerKind,
aWorkerName, aServiceWorkerScope, *aLoadInfo,
std::move(aId), idAndCoop.mId, idAndCoop.mCoop);
// Gecko contexts always have an explicitly-set default locale (set by
// XPJSRuntime::Initialize for the main thread, set by

Просмотреть файл

@ -32,7 +32,6 @@
#include "mozilla/dom/Timeout.h"
#include "mozilla/dom/quota/CheckedUnsafePtr.h"
#include "mozilla/dom/Worker.h"
#include "mozilla/dom/WorkerBinding.h"
#include "mozilla/dom/WorkerCommon.h"
#include "mozilla/dom/WorkerLoadInfo.h"
#include "mozilla/dom/WorkerStatus.h"
@ -143,13 +142,6 @@ class WorkerPrivate final
NS_INLINE_DECL_REFCOUNTING(WorkerPrivate)
static already_AddRefed<WorkerPrivate> Constructor(
JSContext* aCx, const nsAString& aScriptURL, bool aIsChromeWorker,
WorkerKind aWorkerKind, RequestCredentials aRequestCredentials,
const WorkerType aWorkerType, const nsAString& aWorkerName,
const nsACString& aServiceWorkerScope, WorkerLoadInfo* aLoadInfo,
ErrorResult& aRv, nsString aId = u""_ns);
static already_AddRefed<WorkerPrivate> Constructor(
JSContext* aCx, const nsAString& aScriptURL, bool aIsChromeWorker,
WorkerKind aWorkerKind, const nsAString& aWorkerName,
@ -647,8 +639,6 @@ class WorkerPrivate final
const nsString& ScriptURL() const { return mScriptURL; }
const nsString& WorkerName() const { return mWorkerName; }
RequestCredentials WorkerCredentials() const { return mCredentialsMode; }
enum WorkerType WorkerType() const { return mWorkerType; }
WorkerKind Kind() const { return mWorkerKind; }
@ -1060,8 +1050,7 @@ class WorkerPrivate final
private:
WorkerPrivate(
WorkerPrivate* aParent, const nsAString& aScriptURL, bool aIsChromeWorker,
WorkerKind aWorkerKind, RequestCredentials aRequestCredentials,
enum WorkerType aWorkerType, const nsAString& aWorkerName,
WorkerKind aWorkerKind, const nsAString& aWorkerName,
const nsACString& aServiceWorkerScope, WorkerLoadInfo& aLoadInfo,
nsString&& aId, const nsID& aAgentClusterId,
const nsILoadInfo::CrossOriginOpenerPolicy aAgentClusterOpenerPolicy);
@ -1205,8 +1194,6 @@ class WorkerPrivate final
// This is the worker name for shared workers and dedicated workers.
const nsString mWorkerName;
const RequestCredentials mCredentialsMode;
enum WorkerType mWorkerType;
const WorkerKind mWorkerKind;

Просмотреть файл

@ -260,15 +260,6 @@ JSObject* WorkerGlobalScopeBase::GetGlobalJSObject() {
return GetWrapper();
}
void WorkerGlobalScopeBase::NoteTerminating() {
if (mModuleLoader) {
mModuleLoader->Shutdown();
mModuleLoader = nullptr;
}
StartDying();
}
JSObject* WorkerGlobalScopeBase::GetGlobalJSObjectPreserveColor() const {
AssertIsOnWorkerThread();
return GetWrapperPreserveColor();
@ -449,7 +440,7 @@ void WorkerGlobalScope::NoteTerminating() {
return;
}
WorkerGlobalScopeBase::NoteTerminating();
StartDying();
}
void WorkerGlobalScope::NoteShuttingDown() {

Просмотреть файл

@ -8,7 +8,6 @@
#define mozilla_dom_workerscope_h__
#include "js/TypeDecls.h"
#include "js/loader/ModuleLoaderBase.h"
#include "mozilla/Assertions.h"
#include "mozilla/Attributes.h"
#include "mozilla/DOMEventTargetHelper.h"
@ -159,23 +158,8 @@ class WorkerGlobalScopeBase : public DOMEventTargetHelper,
Console* GetConsoleIfExists() const { return mConsole; }
void InitModuleLoader(JS::loader::ModuleLoaderBase* aModuleLoader) {
if (!mModuleLoader) {
mModuleLoader = aModuleLoader;
}
}
// The nullptr here is not used, but is required to make the override method
// have the same signature as other GetModuleLoader methods on globals.
JS::loader::ModuleLoaderBase* GetModuleLoader(
JSContext* aCx = nullptr) override {
return mModuleLoader;
};
uint64_t WindowID() const;
virtual void NoteTerminating();
// Usually global scope dies earlier than the WorkerPrivate, but if we see
// it leak at least we can tell it to not carry away a dead pointer.
void NoteWorkerTerminated() { mWorkerPrivate = nullptr; }
@ -200,7 +184,6 @@ class WorkerGlobalScopeBase : public DOMEventTargetHelper,
private:
RefPtr<Console> mConsole;
RefPtr<JS::loader::ModuleLoaderBase> mModuleLoader;
const UniquePtr<ClientSource> mClientSource;
nsCOMPtr<nsISerialEventTarget> mSerialEventTarget;
bool mShouldResistFingerprinting;
@ -234,7 +217,7 @@ class WorkerGlobalScope : public WorkerGlobalScopeBase {
using WorkerGlobalScopeBase::WorkerGlobalScopeBase;
void NoteTerminating() override;
void NoteTerminating();
void NoteShuttingDown();

Просмотреть файл

@ -85,10 +85,6 @@ class WorkerLoadContext : public JS::loader::LoadContextBase {
// We are importing a script from the worker via ImportScript. This may only
// be a Classic script.
ImportScript,
// We are importing a script from the worker via a Static Import. This may
// only
// be a Module script.
StaticImport,
// We have an attached debugger, and these should be treated specially and
// not like a main script (regardless of their type). This is not part of
// the specification.

Просмотреть файл

@ -1,121 +0,0 @@
/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* vim: set ts=8 sts=2 et sw=2 tw=80: */
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#include "js/experimental/JSStencil.h" // JS::Stencil, JS::CompileModuleScriptToStencil, JS::InstantiateModuleStencil
#include "js/loader/ModuleLoadRequest.h"
#include "mozilla/dom/WorkerLoadContext.h"
#include "mozilla/dom/workerinternals/ScriptLoader.h"
#include "WorkerModuleLoader.h"
#include "nsISupportsImpl.h"
namespace mozilla::dom::workerinternals::loader {
//////////////////////////////////////////////////////////////
// WorkerModuleLoader
//////////////////////////////////////////////////////////////
NS_IMPL_ADDREF_INHERITED(WorkerModuleLoader, JS::loader::ModuleLoaderBase)
NS_IMPL_RELEASE_INHERITED(WorkerModuleLoader, JS::loader::ModuleLoaderBase)
NS_IMPL_CYCLE_COLLECTION_INHERITED(WorkerModuleLoader,
JS::loader::ModuleLoaderBase)
NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION(WorkerModuleLoader)
NS_INTERFACE_MAP_END_INHERITING(JS::loader::ModuleLoaderBase)
WorkerModuleLoader::WorkerModuleLoader(WorkerScriptLoader* aScriptLoader,
nsIGlobalObject* aGlobalObject,
nsISerialEventTarget* aEventTarget)
: ModuleLoaderBase(aScriptLoader, aGlobalObject, aEventTarget) {}
already_AddRefed<ModuleLoadRequest> WorkerModuleLoader::CreateStaticImport(
nsIURI* aURI, ModuleLoadRequest* aParent) {
// We are intentionally deviating from the specification here and using the
// worker's CSP rather than the document CSP. The spec otherwise requires our
// service worker integration to be changed, and additionally the decision
// here did not make sense as we are treating static imports as different from
// other kinds of subresources.
// See Discussion in https://github.com/w3c/webappsec-csp/issues/336
Maybe<ClientInfo> clientInfo = GetGlobalObject()->GetClientInfo();
RefPtr<WorkerLoadContext> loadContext =
new WorkerLoadContext(WorkerLoadContext::Kind::StaticImport, clientInfo);
RefPtr<ModuleLoadRequest> request = new ModuleLoadRequest(
aURI, aParent->mFetchOptions, SRIMetadata(), aParent->mURI, loadContext,
false, /* is top level */
false, /* is dynamic import */
this, aParent->mVisitedSet, aParent->GetRootModule());
request->mURL = request->mURI->GetSpecOrDefault();
request->mBaseURL = aParent->mBaseURL;
return request.forget();
}
already_AddRefed<ModuleLoadRequest> WorkerModuleLoader::CreateDynamicImport(
JSContext* aCx, nsIURI* aURI, LoadedScript* aMaybeActiveScript,
JS::Handle<JS::Value> aReferencingPrivate, JS::Handle<JSString*> aSpecifier,
JS::Handle<JSObject*> aPromise) {
// TODO: Implement for Dedicated workers. Not supported for Service Workers.
return nullptr;
}
bool WorkerModuleLoader::CanStartLoad(ModuleLoadRequest* aRequest,
nsresult* aRvOut) {
return true;
}
nsresult WorkerModuleLoader::StartFetch(ModuleLoadRequest* aRequest) {
if (!GetScriptLoader()->DispatchLoadScript(aRequest)) {
return NS_ERROR_FAILURE;
}
return NS_OK;
}
nsresult WorkerModuleLoader::CompileFetchedModule(
JSContext* aCx, JS::Handle<JSObject*> aGlobal, JS::CompileOptions& aOptions,
ModuleLoadRequest* aRequest, JS::MutableHandle<JSObject*> aModuleScript) {
RefPtr<JS::Stencil> stencil;
MOZ_ASSERT(aRequest->IsTextSource());
MaybeSourceText maybeSource;
nsresult rv = aRequest->GetScriptSource(aCx, &maybeSource);
NS_ENSURE_SUCCESS(rv, rv);
auto compile = [&](auto& source) {
return JS::CompileModuleScriptToStencil(aCx, aOptions, source);
};
stencil = maybeSource.mapNonEmpty(compile);
if (!stencil) {
return NS_ERROR_FAILURE;
}
JS::InstantiateOptions instantiateOptions(aOptions);
aModuleScript.set(
JS::InstantiateModuleStencil(aCx, instantiateOptions, stencil));
if (!aModuleScript) {
return NS_ERROR_FAILURE;
}
return NS_OK;
}
WorkerScriptLoader* WorkerModuleLoader::GetScriptLoader() {
return static_cast<WorkerScriptLoader*>(mLoader.get());
}
void WorkerModuleLoader::OnModuleLoadComplete(ModuleLoadRequest* aRequest) {
if (aRequest->IsTopLevel()) {
AutoJSAPI jsapi;
if (NS_WARN_IF(!jsapi.Init(GetGlobalObject()))) {
return;
}
GetScriptLoader()->MaybeMoveToLoadedList(aRequest);
GetScriptLoader()->ProcessPendingRequests(jsapi.cx());
}
}
} // namespace mozilla::dom::workerinternals::loader

Просмотреть файл

@ -1,71 +0,0 @@
/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* vim: set ts=8 sts=2 et sw=2 tw=80: */
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#ifndef mozilla_loader_WorkerModuleLoader_h
#define mozilla_loader_WorkerModuleLoader_h
#include "js/loader/ModuleLoaderBase.h"
namespace mozilla::dom::workerinternals::loader {
class WorkerScriptLoader;
// alias common classes
using ScriptFetchOptions = JS::loader::ScriptFetchOptions;
using ScriptKind = JS::loader::ScriptKind;
using ScriptLoadRequest = JS::loader::ScriptLoadRequest;
using ScriptLoadRequestList = JS::loader::ScriptLoadRequestList;
using ModuleLoadRequest = JS::loader::ModuleLoadRequest;
// WorkerModuleLoader
//
// The WorkerModuleLoader provides the methods that implement specification
// step 5 from "To fetch a worklet/module worker script graph", specifically for
// workers. In addition, this implements worker specific initialization for
// Static imports and Dynamic imports.
//
// The steps are outlined in "To fetch the descendants of and link a module
// script" and are common for all Modules. Thus we delegate to ModuleLoaderBase
// for those steps.
class WorkerModuleLoader : public JS::loader::ModuleLoaderBase {
public:
NS_DECL_ISUPPORTS_INHERITED
NS_DECL_CYCLE_COLLECTION_CLASS_INHERITED(WorkerModuleLoader,
JS::loader::ModuleLoaderBase)
WorkerModuleLoader(WorkerScriptLoader* aScriptLoader,
nsIGlobalObject* aGlobalObject,
nsISerialEventTarget* aEventTarget);
private:
~WorkerModuleLoader() = default;
WorkerScriptLoader* GetScriptLoader();
already_AddRefed<ModuleLoadRequest> CreateStaticImport(
nsIURI* aURI, ModuleLoadRequest* aParent) override;
already_AddRefed<ModuleLoadRequest> CreateDynamicImport(
JSContext* aCx, nsIURI* aURI, LoadedScript* aMaybeActiveScript,
JS::Handle<JS::Value> aReferencingPrivate,
JS::Handle<JSString*> aSpecifier,
JS::Handle<JSObject*> aPromise) override;
bool CanStartLoad(ModuleLoadRequest* aRequest, nsresult* aRvOut) override;
// StartFetch is special for worker modules, as we need to move back to the
// main thread to start a new load.
nsresult StartFetch(ModuleLoadRequest* aRequest) override;
nsresult CompileFetchedModule(
JSContext* aCx, JS::Handle<JSObject*> aGlobal,
JS::CompileOptions& aOptions, ModuleLoadRequest* aRequest,
JS::MutableHandle<JSObject*> aModuleScript) override;
void OnModuleLoadComplete(ModuleLoadRequest* aRequest) override;
};
} // namespace mozilla::dom::workerinternals::loader
#endif // mozilla_loader_WorkerModuleLoader_h

Просмотреть файл

@ -17,7 +17,6 @@ EXPORTS.mozilla.dom.workerinternals += [
"CacheLoadHandler.h",
"NetworkLoadHandler.h",
"ScriptResponseHeaderProcessor.h",
"WorkerModuleLoader.h",
]
UNIFIED_SOURCES += [
@ -25,7 +24,6 @@ UNIFIED_SOURCES += [
"NetworkLoadHandler.cpp",
"ScriptResponseHeaderProcessor.cpp",
"WorkerLoadContext.cpp",
"WorkerModuleLoader.cpp",
]

Просмотреть файл

@ -328,9 +328,9 @@ struct ParamTraits<nsID> {
template <>
struct ParamTraits<nsContentPolicyType>
: public ContiguousEnumSerializer<nsContentPolicyType,
nsIContentPolicy::TYPE_INVALID,
nsIContentPolicy::TYPE_END> {};
: public ContiguousEnumSerializerInclusive<
nsContentPolicyType, nsIContentPolicy::TYPE_INVALID,
nsIContentPolicy::TYPE_WEB_IDENTITY> {};
template <>
struct ParamTraits<mozilla::TimeDuration> {

Просмотреть файл

@ -983,9 +983,7 @@ void ModuleLoaderBase::Shutdown() {
MOZ_ASSERT(mFetchingModules.IsEmpty());
for (const auto& entry : mFetchedModules) {
if (entry.GetData()) {
entry.GetData()->Shutdown();
}
entry.GetData()->Shutdown();
}
mFetchedModules.Clear();
@ -1213,11 +1211,6 @@ nsresult ModuleLoaderBase::EvaluateModuleInContext(
// unless the user cancels execution.
MOZ_ASSERT_IF(ok, !JS_IsExceptionPending(aCx));
// For long running scripts, the request may be cancelled abruptly.
if (request->IsCanceled() || !mLoader) {
return NS_ERROR_ABORT;
}
if (!ok) {
LOG(("ScriptLoadRequest (%p): evaluation failed", aRequest));
// For a dynamic import, the promise is rejected. Otherwise an error is

Просмотреть файл

@ -171,8 +171,7 @@ interface nsIInterceptedChannel : nsISupports
case nsIContentPolicy::TYPE_INTERNAL_SCRIPT_PRELOAD:
case nsIContentPolicy::TYPE_INTERNAL_MODULE:
case nsIContentPolicy::TYPE_INTERNAL_MODULE_PRELOAD:
case nsIContentPolicy::TYPE_INTERNAL_WORKER_IMPORT_SCRIPTS:
case nsIContentPolicy::TYPE_INTERNAL_WORKER_STATIC_MODULE: {
case nsIContentPolicy::TYPE_INTERNAL_WORKER_IMPORT_SCRIPTS: {
aKey = "subresource-script"_ns;
break;
}

Просмотреть файл

@ -338,8 +338,7 @@ void AssertLoadingPrincipalAndClientInfoMatch(
(aType == nsIContentPolicy::TYPE_INTERNAL_WORKER ||
aType == nsIContentPolicy::TYPE_INTERNAL_SHARED_WORKER ||
aType == nsIContentPolicy::TYPE_INTERNAL_SERVICE_WORKER ||
aType == nsIContentPolicy::TYPE_INTERNAL_WORKER_IMPORT_SCRIPTS ||
aType == nsIContentPolicy::TYPE_INTERNAL_WORKER_STATIC_MODULE)) {
aType == nsIContentPolicy::TYPE_INTERNAL_WORKER_IMPORT_SCRIPTS)) {
return;
}

Просмотреть файл

@ -2805,7 +2805,6 @@ nsresult EnsureMIMEOfScript(HttpBaseChannel* aChannel, nsIURI* aURI,
Telemetry::LABELS_SCRIPT_BLOCK_INCORRECT_MIME_3::script_load);
break;
case nsIContentPolicy::TYPE_INTERNAL_WORKER:
case nsIContentPolicy::TYPE_INTERNAL_WORKER_STATIC_MODULE:
case nsIContentPolicy::TYPE_INTERNAL_SHARED_WORKER:
AccumulateCategorical(
Telemetry::LABELS_SCRIPT_BLOCK_INCORRECT_MIME_3::worker_load);
@ -2930,8 +2929,7 @@ nsresult EnsureMIMEOfScript(HttpBaseChannel* aChannel, nsIURI* aURI,
// We restrict importScripts() in worker code to JavaScript MIME types.
nsContentPolicyType internalType = aLoadInfo->InternalContentPolicyType();
if (internalType == nsIContentPolicy::TYPE_INTERNAL_WORKER_IMPORT_SCRIPTS ||
internalType == nsIContentPolicy::TYPE_INTERNAL_WORKER_STATIC_MODULE) {
if (internalType == nsIContentPolicy::TYPE_INTERNAL_WORKER_IMPORT_SCRIPTS) {
ReportMimeTypeMismatch(aChannel, "BlockImportScriptsWithWrongMimeType",
aURI, contentType, Report::Error);
return NS_ERROR_CORRUPTED_CONTENT;

Просмотреть файл

@ -1,4 +1,12 @@
[worker-import.http.html]
expected:
if (os == "android") and fission: [OK, TIMEOUT]
[Content Security Policy: Expects allowed for worker-import to same-http origin and keep-origin redirection from http context.]
expected: FAIL
[Content Security Policy: Expects allowed for worker-import to same-http origin and no-redirect redirection from http context.]
expected: FAIL
[Content Security Policy: Expects blocked for worker-import to cross-http origin and keep-origin redirection from http context.: securitypolicyviolation]
expected: FAIL
@ -10,15 +18,3 @@
[Content Security Policy: Expects blocked for worker-import to same-http origin and swap-origin redirection from http context.: securitypolicyviolation]
expected: FAIL
[Content Security Policy: Expects blocked for worker-import to cross-http origin and keep-origin redirection from http context.]
expected: FAIL
[Content Security Policy: Expects blocked for worker-import to cross-http origin and no-redirect redirection from http context.]
expected: FAIL
[Content Security Policy: Expects blocked for worker-import to cross-http origin and swap-origin redirection from http context.]
expected: FAIL
[Content Security Policy: Expects blocked for worker-import to same-http origin and swap-origin redirection from http context.]
expected: FAIL

Просмотреть файл

@ -1,4 +1,12 @@
[worker-import.https.html]
expected:
if (os == "android") and fission: [OK, TIMEOUT]
[Content Security Policy: Expects allowed for worker-import to same-https origin and keep-origin redirection from https context.]
expected: FAIL
[Content Security Policy: Expects allowed for worker-import to same-https origin and no-redirect redirection from https context.]
expected: FAIL
[Content Security Policy: Expects blocked for worker-import to cross-https origin and keep-origin redirection from https context.: securitypolicyviolation]
expected: FAIL
@ -10,15 +18,3 @@
[Content Security Policy: Expects blocked for worker-import to same-https origin and swap-origin redirection from https context.: securitypolicyviolation]
expected: FAIL
[Content Security Policy: Expects blocked for worker-import to cross-https origin and keep-origin redirection from https context.]
expected: FAIL
[Content Security Policy: Expects blocked for worker-import to cross-https origin and no-redirect redirection from https context.]
expected: FAIL
[Content Security Policy: Expects blocked for worker-import to cross-https origin and swap-origin redirection from https context.]
expected: FAIL
[Content Security Policy: Expects blocked for worker-import to same-https origin and swap-origin redirection from https context.]
expected: FAIL

Просмотреть файл

@ -0,0 +1,20 @@
[worker-import.http.html]
expected:
if (os == "android") and fission: [OK, TIMEOUT]
[Content Security Policy: Expects allowed for worker-import to cross-http origin and keep-origin redirection from http context.]
expected: FAIL
[Content Security Policy: Expects allowed for worker-import to cross-http origin and no-redirect redirection from http context.]
expected: FAIL
[Content Security Policy: Expects allowed for worker-import to cross-http origin and swap-origin redirection from http context.]
expected: FAIL
[Content Security Policy: Expects allowed for worker-import to same-http origin and keep-origin redirection from http context.]
expected: FAIL
[Content Security Policy: Expects allowed for worker-import to same-http origin and no-redirect redirection from http context.]
expected: FAIL
[Content Security Policy: Expects allowed for worker-import to same-http origin and swap-origin redirection from http context.]
expected: FAIL

Просмотреть файл

@ -0,0 +1,20 @@
[worker-import.https.html]
expected:
if (os == "android") and fission: [OK, TIMEOUT]
[Content Security Policy: Expects allowed for worker-import to cross-https origin and keep-origin redirection from https context.]
expected: FAIL
[Content Security Policy: Expects allowed for worker-import to cross-https origin and no-redirect redirection from https context.]
expected: FAIL
[Content Security Policy: Expects allowed for worker-import to cross-https origin and swap-origin redirection from https context.]
expected: FAIL
[Content Security Policy: Expects allowed for worker-import to same-https origin and keep-origin redirection from https context.]
expected: FAIL
[Content Security Policy: Expects allowed for worker-import to same-https origin and no-redirect redirection from https context.]
expected: FAIL
[Content Security Policy: Expects allowed for worker-import to same-https origin and swap-origin redirection from https context.]
expected: FAIL

Просмотреть файл

@ -1,4 +1,10 @@
[worker-import.http.html]
[Content Security Policy: Expects allowed for worker-import to same-http origin and keep-origin redirection from http context.]
expected: FAIL
[Content Security Policy: Expects allowed for worker-import to same-http origin and no-redirect redirection from http context.]
expected: FAIL
[Content Security Policy: Expects blocked for worker-import to cross-http origin and keep-origin redirection from http context.: securitypolicyviolation]
expected: FAIL
@ -10,15 +16,3 @@
[Content Security Policy: Expects blocked for worker-import to same-http origin and swap-origin redirection from http context.: securitypolicyviolation]
expected: FAIL
[Content Security Policy: Expects blocked for worker-import to cross-http origin and keep-origin redirection from http context.]
expected: FAIL
[Content Security Policy: Expects blocked for worker-import to cross-http origin and no-redirect redirection from http context.]
expected: FAIL
[Content Security Policy: Expects blocked for worker-import to cross-http origin and swap-origin redirection from http context.]
expected: FAIL
[Content Security Policy: Expects blocked for worker-import to same-http origin and swap-origin redirection from http context.]
expected: FAIL

Просмотреть файл

@ -1,4 +1,10 @@
[worker-import.https.html]
[Content Security Policy: Expects allowed for worker-import to same-https origin and keep-origin redirection from https context.]
expected: FAIL
[Content Security Policy: Expects allowed for worker-import to same-https origin and no-redirect redirection from https context.]
expected: FAIL
[Content Security Policy: Expects blocked for worker-import to cross-https origin and keep-origin redirection from https context.: securitypolicyviolation]
expected: FAIL
@ -11,14 +17,3 @@
[Content Security Policy: Expects blocked for worker-import to same-https origin and swap-origin redirection from https context.: securitypolicyviolation]
expected: FAIL
[Content Security Policy: Expects blocked for worker-import to cross-https origin and keep-origin redirection from https context.]
expected: FAIL
[Content Security Policy: Expects blocked for worker-import to cross-https origin and no-redirect redirection from https context.]
expected: FAIL
[Content Security Policy: Expects blocked for worker-import to cross-https origin and swap-origin redirection from https context.]
expected: FAIL
[Content Security Policy: Expects blocked for worker-import to same-https origin and swap-origin redirection from https context.]
expected: FAIL

Просмотреть файл

@ -0,0 +1,20 @@
[worker-import.http.html]
expected:
if (os == "android") and fission: [OK, TIMEOUT]
[Content Security Policy: Expects allowed for worker-import to cross-http origin and keep-origin redirection from http context.]
expected: FAIL
[Content Security Policy: Expects allowed for worker-import to cross-http origin and no-redirect redirection from http context.]
expected: FAIL
[Content Security Policy: Expects allowed for worker-import to cross-http origin and swap-origin redirection from http context.]
expected: FAIL
[Content Security Policy: Expects allowed for worker-import to same-http origin and keep-origin redirection from http context.]
expected: FAIL
[Content Security Policy: Expects allowed for worker-import to same-http origin and no-redirect redirection from http context.]
expected: FAIL
[Content Security Policy: Expects allowed for worker-import to same-http origin and swap-origin redirection from http context.]
expected: FAIL

Просмотреть файл

@ -0,0 +1,20 @@
[worker-import.https.html]
expected:
if (os == "android") and fission: [OK, TIMEOUT]
[Content Security Policy: Expects allowed for worker-import to cross-https origin and keep-origin redirection from https context.]
expected: FAIL
[Content Security Policy: Expects allowed for worker-import to cross-https origin and no-redirect redirection from https context.]
expected: FAIL
[Content Security Policy: Expects allowed for worker-import to cross-https origin and swap-origin redirection from https context.]
expected: FAIL
[Content Security Policy: Expects allowed for worker-import to same-https origin and keep-origin redirection from https context.]
expected: FAIL
[Content Security Policy: Expects allowed for worker-import to same-https origin and no-redirect redirection from https context.]
expected: FAIL
[Content Security Policy: Expects allowed for worker-import to same-https origin and swap-origin redirection from https context.]
expected: FAIL

Просмотреть файл

@ -1,6 +1,12 @@
[worker-import.http.html]
expected:
if (os == "android") and fission: [OK, TIMEOUT]
[Content Security Policy: Expects allowed for worker-import to same-http origin and keep-origin redirection from http context.]
expected: FAIL
[Content Security Policy: Expects allowed for worker-import to same-http origin and no-redirect redirection from http context.]
expected: FAIL
[Content Security Policy: Expects blocked for worker-import to cross-http origin and keep-origin redirection from http context.: securitypolicyviolation]
expected: FAIL
@ -12,15 +18,3 @@
[Content Security Policy: Expects blocked for worker-import to same-http origin and swap-origin redirection from http context.: securitypolicyviolation]
expected: FAIL
[Content Security Policy: Expects blocked for worker-import to cross-http origin and keep-origin redirection from http context.]
expected: FAIL
[Content Security Policy: Expects blocked for worker-import to cross-http origin and no-redirect redirection from http context.]
expected: FAIL
[Content Security Policy: Expects blocked for worker-import to cross-http origin and swap-origin redirection from http context.]
expected: FAIL
[Content Security Policy: Expects blocked for worker-import to same-http origin and swap-origin redirection from http context.]
expected: FAIL

Просмотреть файл

@ -1,6 +1,12 @@
[worker-import.https.html]
expected:
if (os == "android") and fission: [OK, TIMEOUT]
if (os == "android") and fission: [TIMEOUT, OK]
[Content Security Policy: Expects allowed for worker-import to same-https origin and keep-origin redirection from https context.]
expected: FAIL
[Content Security Policy: Expects allowed for worker-import to same-https origin and no-redirect redirection from https context.]
expected: FAIL
[Content Security Policy: Expects blocked for worker-import to cross-https origin and keep-origin redirection from https context.: securitypolicyviolation]
expected: FAIL
@ -12,15 +18,3 @@
[Content Security Policy: Expects blocked for worker-import to same-https origin and swap-origin redirection from https context.: securitypolicyviolation]
expected: FAIL
[Content Security Policy: Expects blocked for worker-import to cross-https origin and keep-origin redirection from https context.]
expected: FAIL
[Content Security Policy: Expects blocked for worker-import to cross-https origin and no-redirect redirection from https context.]
expected: FAIL
[Content Security Policy: Expects blocked for worker-import to cross-https origin and swap-origin redirection from https context.]
expected: FAIL
[Content Security Policy: Expects blocked for worker-import to same-https origin and swap-origin redirection from https context.]
expected: FAIL

Просмотреть файл

@ -1,3 +1,20 @@
[worker-import.http.html]
expected:
if (os == "android") and fission: [OK, TIMEOUT]
[Content Security Policy: Expects allowed for worker-import to cross-http origin and keep-origin redirection from http context.]
expected: FAIL
[Content Security Policy: Expects allowed for worker-import to cross-http origin and no-redirect redirection from http context.]
expected: FAIL
[Content Security Policy: Expects allowed for worker-import to cross-http origin and swap-origin redirection from http context.]
expected: FAIL
[Content Security Policy: Expects allowed for worker-import to same-http origin and keep-origin redirection from http context.]
expected: FAIL
[Content Security Policy: Expects allowed for worker-import to same-http origin and no-redirect redirection from http context.]
expected: FAIL
[Content Security Policy: Expects allowed for worker-import to same-http origin and swap-origin redirection from http context.]
expected: FAIL

Просмотреть файл

@ -0,0 +1,20 @@
[worker-import.https.html]
expected:
if (os == "android") and fission: [OK, TIMEOUT]
[Content Security Policy: Expects allowed for worker-import to cross-https origin and keep-origin redirection from https context.]
expected: FAIL
[Content Security Policy: Expects allowed for worker-import to cross-https origin and no-redirect redirection from https context.]
expected: FAIL
[Content Security Policy: Expects allowed for worker-import to cross-https origin and swap-origin redirection from https context.]
expected: FAIL
[Content Security Policy: Expects allowed for worker-import to same-https origin and keep-origin redirection from https context.]
expected: FAIL
[Content Security Policy: Expects allowed for worker-import to same-https origin and no-redirect redirection from https context.]
expected: FAIL
[Content Security Policy: Expects allowed for worker-import to same-https origin and swap-origin redirection from https context.]
expected: FAIL

Просмотреть файл

@ -1,6 +1,12 @@
[worker-import.http.html]
expected:
if (os == "android") and fission: [OK, TIMEOUT]
[Content Security Policy: Expects allowed for worker-import to same-http origin and keep-origin redirection from http context.]
expected: FAIL
[Content Security Policy: Expects allowed for worker-import to same-http origin and no-redirect redirection from http context.]
expected: FAIL
[Content Security Policy: Expects blocked for worker-import to cross-http origin and keep-origin redirection from http context.: securitypolicyviolation]
expected: FAIL
@ -12,15 +18,3 @@
[Content Security Policy: Expects blocked for worker-import to same-http origin and swap-origin redirection from http context.: securitypolicyviolation]
expected: FAIL
[Content Security Policy: Expects blocked for worker-import to cross-http origin and keep-origin redirection from http context.]
expected: FAIL
[Content Security Policy: Expects blocked for worker-import to cross-http origin and no-redirect redirection from http context.]
expected: FAIL
[Content Security Policy: Expects blocked for worker-import to cross-http origin and swap-origin redirection from http context.]
expected: FAIL
[Content Security Policy: Expects blocked for worker-import to same-http origin and swap-origin redirection from http context.]
expected: FAIL

Просмотреть файл

@ -1,6 +1,12 @@
[worker-import.https.html]
expected:
if (os == "android") and fission: [OK, TIMEOUT]
[Content Security Policy: Expects allowed for worker-import to same-https origin and keep-origin redirection from https context.]
expected: FAIL
[Content Security Policy: Expects allowed for worker-import to same-https origin and no-redirect redirection from https context.]
expected: FAIL
[Content Security Policy: Expects blocked for worker-import to cross-https origin and keep-origin redirection from https context.: securitypolicyviolation]
expected: FAIL
@ -12,15 +18,3 @@
[Content Security Policy: Expects blocked for worker-import to same-https origin and swap-origin redirection from https context.: securitypolicyviolation]
expected: FAIL
[Content Security Policy: Expects blocked for worker-import to cross-https origin and keep-origin redirection from https context.]
expected: FAIL
[Content Security Policy: Expects blocked for worker-import to cross-https origin and no-redirect redirection from https context.]
expected: FAIL
[Content Security Policy: Expects blocked for worker-import to cross-https origin and swap-origin redirection from https context.]
expected: FAIL
[Content Security Policy: Expects blocked for worker-import to same-https origin and swap-origin redirection from https context.]
expected: FAIL

Просмотреть файл

@ -1,3 +1,20 @@
[worker-import.http.html]
expected:
if (os == "android") and fission: [OK, TIMEOUT]
[Content Security Policy: Expects allowed for worker-import to cross-http origin and keep-origin redirection from http context.]
expected: FAIL
[Content Security Policy: Expects allowed for worker-import to cross-http origin and no-redirect redirection from http context.]
expected: FAIL
[Content Security Policy: Expects allowed for worker-import to cross-http origin and swap-origin redirection from http context.]
expected: FAIL
[Content Security Policy: Expects allowed for worker-import to same-http origin and keep-origin redirection from http context.]
expected: FAIL
[Content Security Policy: Expects allowed for worker-import to same-http origin and no-redirect redirection from http context.]
expected: FAIL
[Content Security Policy: Expects allowed for worker-import to same-http origin and swap-origin redirection from http context.]
expected: FAIL

Просмотреть файл

@ -1,3 +1,20 @@
[worker-import.https.html]
expected:
if (os == "android") and fission: [OK, TIMEOUT]
[Content Security Policy: Expects allowed for worker-import to cross-https origin and keep-origin redirection from https context.]
expected: FAIL
[Content Security Policy: Expects allowed for worker-import to cross-https origin and no-redirect redirection from https context.]
expected: FAIL
[Content Security Policy: Expects allowed for worker-import to cross-https origin and swap-origin redirection from https context.]
expected: FAIL
[Content Security Policy: Expects allowed for worker-import to same-https origin and keep-origin redirection from https context.]
expected: FAIL
[Content Security Policy: Expects allowed for worker-import to same-https origin and no-redirect redirection from https context.]
expected: FAIL
[Content Security Policy: Expects allowed for worker-import to same-https origin and swap-origin redirection from https context.]
expected: FAIL

Просмотреть файл

@ -0,0 +1,2 @@
[checkpoint-after-workerglobalscope-onerror-module.html]
expected: TIMEOUT

Просмотреть файл

@ -2,3 +2,4 @@
expected: TIMEOUT
[evaluation-order-1-nothrow-static-import.any.worker-module.html]
expected: TIMEOUT

Просмотреть файл

@ -2,3 +2,4 @@
expected: TIMEOUT
[evaluation-order-1-throw-static-import.any.worker-module.html]
expected: TIMEOUT

Просмотреть файл

@ -2,3 +2,4 @@
expected: TIMEOUT
[evaluation-order-2.any.worker-module.html]
expected: TIMEOUT

Просмотреть файл

@ -1,7 +1,5 @@
[evaluation-order-3.any.worker-module.html]
[Module script queueing a microtask then throwing an exception]
expected: FAIL
expected: TIMEOUT
[evaluation-order-3.any.sharedworker-module.html]
expected: TIMEOUT

Просмотреть файл

@ -50,20 +50,4 @@
[blob-url.any.worker-module.html]
[Blob URLs are supported in dynamic imports]
expected: FAIL
[Identical blob URLs resolve to the same module]
expected: FAIL
[Different blob URLs pointing to the same blob resolve to different modules]
expected: FAIL
[A revoked blob URL will not resolve]
expected: FAIL
[A revoked blob URL will resolve if it's already in the module graph]
expected: FAIL
[Revoking a blob URL immediately after calling import will not fail]
expected: FAIL
expected: TIMEOUT

Просмотреть файл

@ -1,4 +1,5 @@
[import-meta-object.any.worker-module.html]
expected: TIMEOUT
[import-meta-object.any.sharedworker-module.html]
expected: TIMEOUT

Просмотреть файл

@ -1,4 +1,5 @@
[import-meta-resolve.any.worker-module.html]
expected: TIMEOUT
[import-meta-resolve.any.sharedworker-module.html]
expected: TIMEOUT

Просмотреть файл

@ -1,4 +1,5 @@
[import-meta-url.any.worker-module.html]
expected: TIMEOUT
[import-meta-url.any.sharedworker-module.html]
expected: TIMEOUT

Просмотреть файл

@ -1,3 +1,7 @@
[import-meta-url.html]
expected: ERROR
[import.meta.url at top-level module DedicatedWorker]
expected: FAIL
[import.meta.url at top-level module SharedWorker]
expected: FAIL

Просмотреть файл

@ -15,6 +15,7 @@
if (os == "android") and fission: [OK, TIMEOUT]
[context.any.worker-module.html]
expected: TIMEOUT
[context.any.html]

Просмотреть файл

@ -0,0 +1,8 @@
[worker-import-data.https.html]
expected:
if (os == "android") and fission: [OK, TIMEOUT]
[Mixed-Content: Expects allowed for worker-import-data to same-https origin and no-redirect redirection from https context.]
expected: FAIL
[Mixed-Content: Expects allowed for worker-import-data to same-https origin and keep-scheme redirection from https context.]
expected: FAIL

Просмотреть файл

@ -1,3 +1,8 @@
[worker-import.https.html]
expected:
if (os == "android") and fission: [OK, TIMEOUT]
[Mixed-Content: Expects allowed for worker-import to same-https origin and keep-scheme redirection from https context.]
expected: FAIL
[Mixed-Content: Expects allowed for worker-import to same-https origin and no-redirect redirection from https context.]
expected: FAIL

Просмотреть файл

@ -0,0 +1,5 @@
[worker-import-data.https.html]
expected:
if (os == "android") and fission: [OK, TIMEOUT]
[Mixed-Content: Expects allowed for worker-import-data to same-https origin and no-redirect redirection from https context.]
expected: FAIL

Просмотреть файл

@ -1,3 +1,5 @@
[worker-import.https.html]
expected:
if (os == "android") and fission: [OK, TIMEOUT]
[Mixed-Content: Expects allowed for worker-import to same-https origin and no-redirect redirection from https context.]
expected: FAIL

Просмотреть файл

@ -1,3 +1,8 @@
[worker-import-data.https.html]
expected:
if (os == "android") and fission: [OK, TIMEOUT]
[Mixed-Content: Expects allowed for worker-import-data to same-https origin and no-redirect redirection from https context.]
expected: FAIL
[Mixed-Content: Expects allowed for worker-import-data to same-https origin and keep-scheme redirection from https context.]
expected: FAIL

Просмотреть файл

@ -1,3 +1,8 @@
[worker-import.https.html]
expected:
if (os == "android") and fission: [OK, TIMEOUT]
[Mixed-Content: Expects allowed for worker-import to same-https origin and keep-scheme redirection from https context.]
expected: FAIL
[Mixed-Content: Expects allowed for worker-import to same-https origin and no-redirect redirection from https context.]
expected: FAIL

Просмотреть файл

@ -0,0 +1,6 @@
[fetch.https.html]
[Mixed-Content: Expects allowed for fetch to same-https origin and keep-scheme redirection from https context.]
expected: FAIL
[Mixed-Content: Expects allowed for fetch to same-https origin and no-redirect redirection from https context.]
expected: FAIL

Просмотреть файл

@ -0,0 +1,3 @@
[websocket.https.html]
[Mixed-Content: Expects allowed for websocket to same-wss origin and no-redirect redirection from https context.]
expected: FAIL

Просмотреть файл

@ -0,0 +1,8 @@
[worker-classic.https.html]
expected:
if (os == "android") and fission: [OK, TIMEOUT]
[Mixed-Content: Expects allowed for worker-classic to same-https origin and keep-scheme redirection from https context.]
expected: FAIL
[Mixed-Content: Expects allowed for worker-classic to same-https origin and no-redirect redirection from https context.]
expected: FAIL

Просмотреть файл

@ -0,0 +1,8 @@
[worker-module.https.html]
expected:
if (os == "android") and fission: [OK, TIMEOUT]
[Mixed-Content: Expects allowed for worker-module to same-https origin and keep-scheme redirection from https context.]
expected: FAIL
[Mixed-Content: Expects allowed for worker-module to same-https origin and no-redirect redirection from https context.]
expected: FAIL

Просмотреть файл

@ -0,0 +1,8 @@
[xhr.https.html]
expected:
if (os == "android") and fission: [OK, TIMEOUT]
[Mixed-Content: Expects allowed for xhr to same-https origin and keep-scheme redirection from https context.]
expected: FAIL
[Mixed-Content: Expects allowed for xhr to same-https origin and no-redirect redirection from https context.]
expected: FAIL

Просмотреть файл

@ -1,3 +1,8 @@
[fetch.https.html]
expected:
if (os == "android") and fission: [OK, TIMEOUT]
[Mixed-Content: Expects allowed for fetch to same-https origin and keep-scheme redirection from https context.]
expected: FAIL
[Mixed-Content: Expects allowed for fetch to same-https origin and no-redirect redirection from https context.]
expected: FAIL

Просмотреть файл

@ -0,0 +1,5 @@
[websocket.https.html]
expected:
if (os == "android") and fission: [OK, TIMEOUT]
[Mixed-Content: Expects allowed for websocket to same-wss origin and no-redirect redirection from https context.]
expected: FAIL

Просмотреть файл

@ -1,3 +1,8 @@
[worker-classic.https.html]
expected:
if (os == "android") and fission: [OK, TIMEOUT]
[Mixed-Content: Expects allowed for worker-classic to same-https origin and keep-scheme redirection from https context.]
expected: FAIL
[Mixed-Content: Expects allowed for worker-classic to same-https origin and no-redirect redirection from https context.]
expected: FAIL

Просмотреть файл

@ -1,3 +1,8 @@
[worker-module.https.html]
expected:
if (os == "android") and fission: [OK, TIMEOUT]
[Mixed-Content: Expects allowed for worker-module to same-https origin and keep-scheme redirection from https context.]
expected: FAIL
[Mixed-Content: Expects allowed for worker-module to same-https origin and no-redirect redirection from https context.]
expected: FAIL

Просмотреть файл

@ -1,3 +1,8 @@
[xhr.https.html]
expected:
if (os == "android") and fission: [OK, TIMEOUT]
[Mixed-Content: Expects allowed for xhr to same-https origin and keep-scheme redirection from https context.]
expected: FAIL
[Mixed-Content: Expects allowed for xhr to same-https origin and no-redirect redirection from https context.]
expected: FAIL

Просмотреть файл

@ -0,0 +1,38 @@
[fetch.http.html]
expected:
if (os == "android") and fission: [OK, TIMEOUT]
[Referrer Policy: Expects stripped-referrer for fetch to same-https origin and no-redirect redirection from http context.]
expected: FAIL
[Referrer Policy: Expects stripped-referrer for fetch to cross-https origin and keep-origin redirection from http context.]
expected: FAIL
[Referrer Policy: Expects stripped-referrer for fetch to cross-http origin and no-redirect redirection from http context.]
expected: FAIL
[Referrer Policy: Expects stripped-referrer for fetch to same-http origin and keep-origin redirection from http context.]
expected: FAIL
[Referrer Policy: Expects stripped-referrer for fetch to cross-https origin and swap-origin redirection from http context.]
expected: FAIL
[Referrer Policy: Expects stripped-referrer for fetch to same-https origin and swap-origin redirection from http context.]
expected: FAIL
[Referrer Policy: Expects stripped-referrer for fetch to same-https origin and keep-origin redirection from http context.]
expected: FAIL
[Referrer Policy: Expects stripped-referrer for fetch to cross-http origin and swap-origin redirection from http context.]
expected: FAIL
[Referrer Policy: Expects stripped-referrer for fetch to cross-https origin and no-redirect redirection from http context.]
expected: FAIL
[Referrer Policy: Expects stripped-referrer for fetch to same-http origin and swap-origin redirection from http context.]
expected: FAIL
[Referrer Policy: Expects stripped-referrer for fetch to same-http origin and no-redirect redirection from http context.]
expected: FAIL
[Referrer Policy: Expects stripped-referrer for fetch to cross-http origin and keep-origin redirection from http context.]
expected: FAIL

Просмотреть файл

@ -0,0 +1,8 @@
[worker-classic.http.html]
expected:
if (os == "android") and fission: [OK, TIMEOUT]
[Referrer Policy: Expects stripped-referrer for worker-classic to same-http origin and no-redirect redirection from http context.]
expected: FAIL
[Referrer Policy: Expects stripped-referrer for worker-classic to same-http origin and keep-origin redirection from http context.]
expected: FAIL

Просмотреть файл

@ -1,3 +1,8 @@
[worker-module.http.html]
expected:
if (os == "android") and fission: [OK, TIMEOUT]
[Referrer Policy: Expects stripped-referrer for worker-module to same-http origin and keep-origin redirection from http context.]
expected: FAIL
[Referrer Policy: Expects stripped-referrer for worker-module to same-http origin and no-redirect redirection from http context.]
expected: FAIL

Просмотреть файл

@ -1,3 +1,38 @@
[xhr.http.html]
expected:
if (os == "android") and fission: [OK, TIMEOUT]
[Referrer Policy: Expects stripped-referrer for xhr to cross-http origin and keep-origin redirection from http context.]
expected: FAIL
[Referrer Policy: Expects stripped-referrer for xhr to cross-http origin and no-redirect redirection from http context.]
expected: FAIL
[Referrer Policy: Expects stripped-referrer for xhr to same-http origin and no-redirect redirection from http context.]
expected: FAIL
[Referrer Policy: Expects stripped-referrer for xhr to same-https origin and keep-origin redirection from http context.]
expected: FAIL
[Referrer Policy: Expects stripped-referrer for xhr to cross-https origin and keep-origin redirection from http context.]
expected: FAIL
[Referrer Policy: Expects stripped-referrer for xhr to cross-https origin and swap-origin redirection from http context.]
expected: FAIL
[Referrer Policy: Expects stripped-referrer for xhr to cross-http origin and swap-origin redirection from http context.]
expected: FAIL
[Referrer Policy: Expects stripped-referrer for xhr to same-https origin and no-redirect redirection from http context.]
expected: FAIL
[Referrer Policy: Expects stripped-referrer for xhr to same-http origin and keep-origin redirection from http context.]
expected: FAIL
[Referrer Policy: Expects stripped-referrer for xhr to same-http origin and swap-origin redirection from http context.]
expected: FAIL
[Referrer Policy: Expects stripped-referrer for xhr to cross-https origin and no-redirect redirection from http context.]
expected: FAIL
[Referrer Policy: Expects stripped-referrer for xhr to same-https origin and swap-origin redirection from http context.]
expected: FAIL

Просмотреть файл

@ -0,0 +1,37 @@
[fetch.http.html]
[Referrer Policy: Expects omitted for fetch to cross-https origin and keep-origin redirection from http context.]
expected: FAIL
[Referrer Policy: Expects omitted for fetch to cross-http origin and no-redirect redirection from http context.]
expected: FAIL
[Referrer Policy: Expects omitted for fetch to same-http origin and swap-origin redirection from http context.]
expected: FAIL
[Referrer Policy: Expects omitted for fetch to same-https origin and keep-origin redirection from http context.]
expected: FAIL
[Referrer Policy: Expects omitted for fetch to same-http origin and no-redirect redirection from http context.]
expected: FAIL
[Referrer Policy: Expects omitted for fetch to cross-https origin and swap-origin redirection from http context.]
expected: FAIL
[Referrer Policy: Expects omitted for fetch to cross-http origin and swap-origin redirection from http context.]
expected: FAIL
[Referrer Policy: Expects omitted for fetch to same-http origin and keep-origin redirection from http context.]
expected: FAIL
[Referrer Policy: Expects omitted for fetch to cross-http origin and keep-origin redirection from http context.]
expected: FAIL
[Referrer Policy: Expects omitted for fetch to same-https origin and swap-origin redirection from http context.]
expected: FAIL
[Referrer Policy: Expects omitted for fetch to same-https origin and no-redirect redirection from http context.]
expected: FAIL
[Referrer Policy: Expects omitted for fetch to cross-https origin and no-redirect redirection from http context.]
expected: FAIL

Просмотреть файл

@ -0,0 +1,7 @@
[worker-classic.http.html]
[Referrer Policy: Expects omitted for worker-classic to same-http origin and keep-origin redirection from http context.]
expected: FAIL
[Referrer Policy: Expects omitted for worker-classic to same-http origin and no-redirect redirection from http context.]
expected: FAIL

Просмотреть файл

@ -0,0 +1,7 @@
[worker-module.http.html]
[Referrer Policy: Expects omitted for worker-module to same-http origin and keep-origin redirection from http context.]
expected: FAIL
[Referrer Policy: Expects omitted for worker-module to same-http origin and no-redirect redirection from http context.]
expected: FAIL

Просмотреть файл

@ -1,3 +1,38 @@
[fetch.http.html]
expected:
if (os == "android") and fission: [OK, TIMEOUT]
[Referrer Policy: Expects origin for fetch to same-http origin and swap-origin redirection from http context.]
expected: FAIL
[Referrer Policy: Expects origin for fetch to same-https origin and swap-origin redirection from http context.]
expected: FAIL
[Referrer Policy: Expects origin for fetch to same-https origin and no-redirect redirection from http context.]
expected: FAIL
[Referrer Policy: Expects origin for fetch to same-https origin and keep-origin redirection from http context.]
expected: FAIL
[Referrer Policy: Expects origin for fetch to cross-http origin and no-redirect redirection from http context.]
expected: FAIL
[Referrer Policy: Expects stripped-referrer for fetch to same-http origin and keep-origin redirection from http context.]
expected: FAIL
[Referrer Policy: Expects origin for fetch to cross-http origin and swap-origin redirection from http context.]
expected: FAIL
[Referrer Policy: Expects origin for fetch to cross-http origin and keep-origin redirection from http context.]
expected: FAIL
[Referrer Policy: Expects origin for fetch to cross-https origin and no-redirect redirection from http context.]
expected: FAIL
[Referrer Policy: Expects origin for fetch to cross-https origin and swap-origin redirection from http context.]
expected: FAIL
[Referrer Policy: Expects origin for fetch to cross-https origin and keep-origin redirection from http context.]
expected: FAIL
[Referrer Policy: Expects stripped-referrer for fetch to same-http origin and no-redirect redirection from http context.]
expected: FAIL

Просмотреть файл

@ -0,0 +1,8 @@
[worker-classic.http.html]
expected:
if (os == "android") and fission: [OK, TIMEOUT]
[Referrer Policy: Expects stripped-referrer for worker-classic to same-http origin and keep-origin redirection from http context.]
expected: FAIL
[Referrer Policy: Expects stripped-referrer for worker-classic to same-http origin and no-redirect redirection from http context.]
expected: FAIL

Просмотреть файл

@ -1,3 +1,8 @@
[worker-module.http.html]
expected:
if (os == "android") and fission: [OK, TIMEOUT]
[Referrer Policy: Expects stripped-referrer for worker-module to same-http origin and keep-origin redirection from http context.]
expected: FAIL
[Referrer Policy: Expects stripped-referrer for worker-module to same-http origin and no-redirect redirection from http context.]
expected: FAIL

Просмотреть файл

@ -13,12 +13,18 @@
[Referrer Policy: Expects origin for xhr to cross-https origin and keep-origin redirection from http context.]
expected: FAIL
[Referrer Policy: Expects stripped-referrer for xhr to same-http origin and no-redirect redirection from http context.]
expected: FAIL
[Referrer Policy: Expects origin for xhr to cross-http origin and no-redirect redirection from http context.]
expected: FAIL
[Referrer Policy: Expects origin for xhr to same-https origin and keep-origin redirection from http context.]
expected: FAIL
[Referrer Policy: Expects stripped-referrer for xhr to same-http origin and keep-origin redirection from http context.]
expected: FAIL
[Referrer Policy: Expects origin for xhr to cross-http origin and keep-origin redirection from http context.]
expected: FAIL

Просмотреть файл

@ -0,0 +1,38 @@
[fetch.http.html]
expected:
if (os == "android") and fission: [OK, TIMEOUT]
[Referrer Policy: Expects origin for fetch to same-http origin and swap-origin redirection from http context.]
expected: FAIL
[Referrer Policy: Expects origin for fetch to same-http origin and keep-origin redirection from http context.]
expected: FAIL
[Referrer Policy: Expects origin for fetch to same-https origin and swap-origin redirection from http context.]
expected: FAIL
[Referrer Policy: Expects origin for fetch to same-https origin and no-redirect redirection from http context.]
expected: FAIL
[Referrer Policy: Expects origin for fetch to same-http origin and no-redirect redirection from http context.]
expected: FAIL
[Referrer Policy: Expects origin for fetch to same-https origin and keep-origin redirection from http context.]
expected: FAIL
[Referrer Policy: Expects origin for fetch to cross-http origin and no-redirect redirection from http context.]
expected: FAIL
[Referrer Policy: Expects origin for fetch to cross-http origin and swap-origin redirection from http context.]
expected: FAIL
[Referrer Policy: Expects origin for fetch to cross-http origin and keep-origin redirection from http context.]
expected: FAIL
[Referrer Policy: Expects origin for fetch to cross-https origin and no-redirect redirection from http context.]
expected: FAIL
[Referrer Policy: Expects origin for fetch to cross-https origin and swap-origin redirection from http context.]
expected: FAIL
[Referrer Policy: Expects origin for fetch to cross-https origin and keep-origin redirection from http context.]
expected: FAIL

Просмотреть файл

@ -0,0 +1,8 @@
[worker-classic.http.html]
expected:
if (os == "android") and fission: [OK, TIMEOUT]
[Referrer Policy: Expects origin for worker-classic to same-http origin and keep-origin redirection from http context.]
expected: FAIL
[Referrer Policy: Expects origin for worker-classic to same-http origin and no-redirect redirection from http context.]
expected: FAIL

Просмотреть файл

@ -0,0 +1,8 @@
[worker-module.http.html]
expected:
if (os == "android") and fission: [OK, TIMEOUT]
[Referrer Policy: Expects origin for worker-module to same-http origin and no-redirect redirection from http context.]
expected: FAIL
[Referrer Policy: Expects origin for worker-module to same-http origin and keep-origin redirection from http context.]
expected: FAIL

Просмотреть файл

@ -0,0 +1,32 @@
[fetch.http.html]
expected:
if (os == "android") and fission: [OK, TIMEOUT]
[Referrer Policy: Expects omitted for fetch to cross-https origin and keep-origin redirection from http context.]
expected: FAIL
[Referrer Policy: Expects omitted for fetch to cross-http origin and no-redirect redirection from http context.]
expected: FAIL
[Referrer Policy: Expects omitted for fetch to same-http origin and swap-origin redirection from http context.]
expected: FAIL
[Referrer Policy: Expects omitted for fetch to cross-https origin and swap-origin redirection from http context.]
expected: FAIL
[Referrer Policy: Expects stripped-referrer for fetch to same-http origin and keep-origin redirection from http context.]
expected: FAIL
[Referrer Policy: Expects omitted for fetch to cross-http origin and swap-origin redirection from http context.]
expected: FAIL
[Referrer Policy: Expects omitted for fetch to cross-http origin and keep-origin redirection from http context.]
expected: FAIL
[Referrer Policy: Expects omitted for fetch to cross-https origin and no-redirect redirection from http context.]
expected: FAIL
[Referrer Policy: Expects omitted for fetch to same-https origin and swap-origin redirection from http context.]
expected: FAIL
[Referrer Policy: Expects stripped-referrer for fetch to same-http origin and no-redirect redirection from http context.]
expected: FAIL

Просмотреть файл

@ -0,0 +1,8 @@
[worker-classic.http.html]
expected:
if (os == "android") and fission: [OK, TIMEOUT]
[Referrer Policy: Expects stripped-referrer for worker-classic to same-http origin and no-redirect redirection from http context.]
expected: FAIL
[Referrer Policy: Expects stripped-referrer for worker-classic to same-http origin and keep-origin redirection from http context.]
expected: FAIL

Просмотреть файл

@ -1,3 +1,8 @@
[worker-module.http.html]
expected:
if (os == "android") and fission: [TIMEOUT, OK]
if (os == "android") and fission: [OK, TIMEOUT]
[Referrer Policy: Expects stripped-referrer for worker-module to same-http origin and no-redirect redirection from http context.]
expected: FAIL
[Referrer Policy: Expects stripped-referrer for worker-module to same-http origin and keep-origin redirection from http context.]
expected: FAIL

Просмотреть файл

@ -1,6 +1,9 @@
[xhr.http.html]
expected:
if (os == "android") and fission: [OK, TIMEOUT]
[Referrer Policy: Expects stripped-referrer for xhr to same-http origin and no-redirect redirection from http context.]
expected: FAIL
[Referrer Policy: Expects omitted for xhr to cross-http origin and keep-origin redirection from http context.]
expected: FAIL
@ -13,6 +16,9 @@
[Referrer Policy: Expects omitted for xhr to cross-https origin and no-redirect redirection from http context.]
expected: FAIL
[Referrer Policy: Expects stripped-referrer for xhr to same-http origin and keep-origin redirection from http context.]
expected: FAIL
[Referrer Policy: Expects omitted for xhr to cross-http origin and no-redirect redirection from http context.]
expected: FAIL

Просмотреть файл

@ -1,3 +1,38 @@
[fetch.http.html]
expected:
if (os == "android") and fission: [OK, TIMEOUT]
[Referrer Policy: Expects origin for fetch to same-http origin and swap-origin redirection from http context.]
expected: FAIL
[Referrer Policy: Expects origin for fetch to same-https origin and swap-origin redirection from http context.]
expected: FAIL
[Referrer Policy: Expects origin for fetch to same-https origin and no-redirect redirection from http context.]
expected: FAIL
[Referrer Policy: Expects origin for fetch to same-https origin and keep-origin redirection from http context.]
expected: FAIL
[Referrer Policy: Expects origin for fetch to cross-https origin and keep-origin redirection from http context.]
expected: FAIL
[Referrer Policy: Expects stripped-referrer for fetch to same-http origin and keep-origin redirection from http context.]
expected: FAIL
[Referrer Policy: Expects origin for fetch to cross-http origin and swap-origin redirection from http context.]
expected: FAIL
[Referrer Policy: Expects origin for fetch to cross-http origin and keep-origin redirection from http context.]
expected: FAIL
[Referrer Policy: Expects origin for fetch to cross-https origin and no-redirect redirection from http context.]
expected: FAIL
[Referrer Policy: Expects origin for fetch to cross-https origin and swap-origin redirection from http context.]
expected: FAIL
[Referrer Policy: Expects origin for fetch to cross-http origin and no-redirect redirection from http context.]
expected: FAIL
[Referrer Policy: Expects stripped-referrer for fetch to same-http origin and no-redirect redirection from http context.]
expected: FAIL

Просмотреть файл

@ -1,3 +1,8 @@
[worker-classic.http.html]
expected:
if (os == "android") and fission: [TIMEOUT, OK]
if (os == "android") and fission: [OK, TIMEOUT]
[Referrer Policy: Expects stripped-referrer for worker-classic to same-http origin and no-redirect redirection from http context.]
expected: FAIL
[Referrer Policy: Expects stripped-referrer for worker-classic to same-http origin and keep-origin redirection from http context.]
expected: FAIL

Просмотреть файл

@ -1,3 +1,8 @@
[worker-module.http.html]
expected:
if (os == "android") and fission: [OK, TIMEOUT]
[Referrer Policy: Expects stripped-referrer for worker-module to same-http origin and no-redirect redirection from http context.]
expected: FAIL
[Referrer Policy: Expects stripped-referrer for worker-module to same-http origin and keep-origin redirection from http context.]
expected: FAIL

Просмотреть файл

@ -13,12 +13,18 @@
[Referrer Policy: Expects origin for xhr to cross-https origin and keep-origin redirection from http context.]
expected: FAIL
[Referrer Policy: Expects stripped-referrer for xhr to same-http origin and no-redirect redirection from http context.]
expected: FAIL
[Referrer Policy: Expects origin for xhr to cross-http origin and no-redirect redirection from http context.]
expected: FAIL
[Referrer Policy: Expects origin for xhr to same-https origin and keep-origin redirection from http context.]
expected: FAIL
[Referrer Policy: Expects stripped-referrer for xhr to same-http origin and keep-origin redirection from http context.]
expected: FAIL
[Referrer Policy: Expects origin for xhr to cross-http origin and keep-origin redirection from http context.]
expected: FAIL

Просмотреть файл

@ -0,0 +1,38 @@
[fetch.http.html]
expected:
if (os == "android") and fission: [OK, TIMEOUT]
[Referrer Policy: Expects origin for fetch to same-http origin and swap-origin redirection from http context.]
expected: FAIL
[Referrer Policy: Expects origin for fetch to same-http origin and keep-origin redirection from http context.]
expected: FAIL
[Referrer Policy: Expects origin for fetch to same-https origin and swap-origin redirection from http context.]
expected: FAIL
[Referrer Policy: Expects origin for fetch to same-https origin and no-redirect redirection from http context.]
expected: FAIL
[Referrer Policy: Expects origin for fetch to same-http origin and no-redirect redirection from http context.]
expected: FAIL
[Referrer Policy: Expects origin for fetch to same-https origin and keep-origin redirection from http context.]
expected: FAIL
[Referrer Policy: Expects origin for fetch to cross-http origin and no-redirect redirection from http context.]
expected: FAIL
[Referrer Policy: Expects origin for fetch to cross-http origin and swap-origin redirection from http context.]
expected: FAIL
[Referrer Policy: Expects origin for fetch to cross-http origin and keep-origin redirection from http context.]
expected: FAIL
[Referrer Policy: Expects origin for fetch to cross-https origin and no-redirect redirection from http context.]
expected: FAIL
[Referrer Policy: Expects origin for fetch to cross-https origin and swap-origin redirection from http context.]
expected: FAIL
[Referrer Policy: Expects origin for fetch to cross-https origin and keep-origin redirection from http context.]
expected: FAIL

Просмотреть файл

@ -1,3 +1,8 @@
[worker-classic.http.html]
expected:
if (os == "android") and fission: [OK, TIMEOUT]
[Referrer Policy: Expects origin for worker-classic to same-http origin and keep-origin redirection from http context.]
expected: FAIL
[Referrer Policy: Expects origin for worker-classic to same-http origin and no-redirect redirection from http context.]
expected: FAIL

Просмотреть файл

@ -1,3 +1,8 @@
[worker-module.http.html]
expected:
if (os == "android") and fission: [OK, TIMEOUT]
[Referrer Policy: Expects origin for worker-module to same-http origin and no-redirect redirection from http context.]
expected: FAIL
[Referrer Policy: Expects origin for worker-module to same-http origin and keep-origin redirection from http context.]
expected: FAIL

Просмотреть файл

@ -0,0 +1,38 @@
[fetch.http.html]
expected:
if (os == "android") and fission: [OK, TIMEOUT]
[Referrer Policy: Expects stripped-referrer for fetch to same-https origin and no-redirect redirection from http context.]
expected: FAIL
[Referrer Policy: Expects stripped-referrer for fetch to cross-https origin and keep-origin redirection from http context.]
expected: FAIL
[Referrer Policy: Expects stripped-referrer for fetch to cross-http origin and no-redirect redirection from http context.]
expected: FAIL
[Referrer Policy: Expects stripped-referrer for fetch to same-http origin and keep-origin redirection from http context.]
expected: FAIL
[Referrer Policy: Expects stripped-referrer for fetch to cross-https origin and swap-origin redirection from http context.]
expected: FAIL
[Referrer Policy: Expects stripped-referrer for fetch to same-https origin and swap-origin redirection from http context.]
expected: FAIL
[Referrer Policy: Expects stripped-referrer for fetch to same-https origin and keep-origin redirection from http context.]
expected: FAIL
[Referrer Policy: Expects stripped-referrer for fetch to cross-http origin and swap-origin redirection from http context.]
expected: FAIL
[Referrer Policy: Expects stripped-referrer for fetch to cross-http origin and keep-origin redirection from http context.]
expected: FAIL
[Referrer Policy: Expects stripped-referrer for fetch to same-http origin and swap-origin redirection from http context.]
expected: FAIL
[Referrer Policy: Expects stripped-referrer for fetch to same-http origin and no-redirect redirection from http context.]
expected: FAIL
[Referrer Policy: Expects stripped-referrer for fetch to cross-https origin and no-redirect redirection from http context.]
expected: FAIL

Просмотреть файл

@ -0,0 +1,8 @@
[worker-classic.http.html]
expected:
if (os == "android") and fission: [OK, TIMEOUT]
[Referrer Policy: Expects stripped-referrer for worker-classic to same-http origin and keep-origin redirection from http context.]
expected: FAIL
[Referrer Policy: Expects stripped-referrer for worker-classic to same-http origin and no-redirect redirection from http context.]
expected: FAIL

Просмотреть файл

@ -0,0 +1,8 @@
[worker-module.http.html]
expected:
if (os == "android") and fission: [OK, TIMEOUT]
[Referrer Policy: Expects stripped-referrer for worker-module to same-http origin and keep-origin redirection from http context.]
expected: FAIL
[Referrer Policy: Expects stripped-referrer for worker-module to same-http origin and no-redirect redirection from http context.]
expected: FAIL

Просмотреть файл

@ -0,0 +1,38 @@
[xhr.http.html]
expected:
if (os == "android") and fission: [OK, TIMEOUT]
[Referrer Policy: Expects stripped-referrer for xhr to cross-https origin and no-redirect redirection from http context.]
expected: FAIL
[Referrer Policy: Expects stripped-referrer for xhr to same-http origin and no-redirect redirection from http context.]
expected: FAIL
[Referrer Policy: Expects stripped-referrer for xhr to same-https origin and keep-origin redirection from http context.]
expected: FAIL
[Referrer Policy: Expects stripped-referrer for xhr to cross-https origin and keep-origin redirection from http context.]
expected: FAIL
[Referrer Policy: Expects stripped-referrer for xhr to cross-http origin and swap-origin redirection from http context.]
expected: FAIL
[Referrer Policy: Expects stripped-referrer for xhr to cross-https origin and swap-origin redirection from http context.]
expected: FAIL
[Referrer Policy: Expects stripped-referrer for xhr to same-https origin and no-redirect redirection from http context.]
expected: FAIL
[Referrer Policy: Expects stripped-referrer for xhr to same-http origin and keep-origin redirection from http context.]
expected: FAIL
[Referrer Policy: Expects stripped-referrer for xhr to cross-http origin and keep-origin redirection from http context.]
expected: FAIL
[Referrer Policy: Expects stripped-referrer for xhr to same-http origin and swap-origin redirection from http context.]
expected: FAIL
[Referrer Policy: Expects stripped-referrer for xhr to cross-http origin and no-redirect redirection from http context.]
expected: FAIL
[Referrer Policy: Expects stripped-referrer for xhr to same-https origin and swap-origin redirection from http context.]
expected: FAIL

Просмотреть файл

@ -1,6 +1,11 @@
[fetch.http.html]
expected:
if (os == "android") and fission: [OK, TIMEOUT]
[Referrer Policy: Expects stripped-referrer for fetch to same-http origin and keep-origin redirection from http context.]
expected: FAIL
[Referrer Policy: Expects stripped-referrer for fetch to same-http origin and no-redirect redirection from http context.]
expected: FAIL
[Referrer Policy: Expects origin for fetch to same-http origin and swap-origin redirection from http context.]
expected: FAIL

Некоторые файлы не были показаны из-за слишком большого количества измененных файлов Показать больше