Skip to content

Commit f0caab3

Browse files
committed
JS Modules in Workers
https://bugs.webkit.org/show_bug.cgi?id=164860 Reviewed by Saam Barati. LayoutTests/imported/w3c: Some of worklet failures in WPT is because, 1. Previously, worklet does not support module. These tests are passing incorrectly when modules are not supported. Now, modules are supported, and some edge features are missing, so start failing 2. WPT is using www1.localhost in some tests (CSP tests), and this is not supported in WebKit's WPT testing. So failing incorrectly. * web-platform-tests/html/semantics/scripting-1/the-script-element/json-module/non-object.tentative.any.worker-expected.txt: * web-platform-tests/html/semantics/scripting-1/the-script-element/microtasks/checkpoint-after-workerglobalscope-onerror-module-expected.txt: * web-platform-tests/html/semantics/scripting-1/the-script-element/module/dynamic-import/alpha/base-url-worker-importScripts-expected.txt: * web-platform-tests/html/semantics/scripting-1/the-script-element/module/dynamic-import/alpha/base-url-worker.sub-expected.txt: * web-platform-tests/html/semantics/scripting-1/the-script-element/module/evaluation-order-1-nothrow-worker-expected.txt: * web-platform-tests/html/semantics/scripting-1/the-script-element/module/evaluation-order-1-worker-expected.txt: * web-platform-tests/html/semantics/scripting-1/the-script-element/module/evaluation-order-2-import-worker-expected.txt: * web-platform-tests/html/semantics/scripting-1/the-script-element/module/evaluation-order-3-dynamic-worker-expected.txt: * web-platform-tests/service-workers/service-worker/import-module-scripts.https-expected.txt: * web-platform-tests/workers/baseurl/alpha/import-in-moduleworker-expected.txt: * web-platform-tests/workers/baseurl/alpha/importScripts-in-worker-expected.txt: * web-platform-tests/workers/baseurl/alpha/xhr-in-moduleworker-expected.txt: * web-platform-tests/workers/baseurl/alpha/xhr-in-worker-expected.txt: * web-platform-tests/workers/constructors/Worker/same-origin-expected.txt: * web-platform-tests/workers/interfaces/WorkerGlobalScope/location/redirect-expected.txt: * web-platform-tests/workers/interfaces/WorkerGlobalScope/location/redirect-module-expected.txt: * web-platform-tests/workers/modules/dedicated-worker-import-blob-url.any-expected.txt: * web-platform-tests/workers/modules/dedicated-worker-import-csp-expected.txt: * web-platform-tests/workers/modules/dedicated-worker-import-failure-expected.txt: * web-platform-tests/workers/modules/dedicated-worker-import-meta-expected.txt: * web-platform-tests/workers/modules/dedicated-worker-import-meta.html: * web-platform-tests/workers/modules/dedicated-worker-import-referrer-expected.txt: * web-platform-tests/workers/modules/dedicated-worker-import.any-expected.txt: * web-platform-tests/workers/modules/dedicated-worker-options-type-expected.txt: * web-platform-tests/workers/modules/dedicated-worker-parse-error-failure-expected.txt: * web-platform-tests/workers/name-property-expected.txt: * web-platform-tests/worklets/audio-worklet-credentials.https-expected.txt: * web-platform-tests/worklets/audio-worklet-csp.https-expected.txt: * web-platform-tests/worklets/audio-worklet-import.https-expected.txt: * web-platform-tests/worklets/audio-worklet-referrer.https-expected.txt: * web-platform-tests/xhr/open-url-redirected-worker-origin-expected.txt: Source/JavaScriptCore: Add error information to extract this in WebCore's module loader. Currently, we are using Promise pipeline, and this makes it a bit difficult to extract error information. This error information attached in this patch allows us to extract SyntaxError in WebCore, and throwing JS SyntaxError instead of AbortError. We are planning to update our module pipieline not using Promises in the future. The current design derived from the original module loader pipeline where using Promises is critical. But now, that proposal was abandoned, so we can just simplify the module loader. * runtime/AggregateError.cpp: (JSC::AggregateError::AggregateError): * runtime/Error.cpp: (JSC::createError): (JSC::createEvalError): (JSC::createRangeError): (JSC::createReferenceError): (JSC::createSyntaxError): (JSC::createTypeError): (JSC::createURIError): (JSC::createGetterTypeError): (JSC::throwSyntaxError): * runtime/Error.h: * runtime/ErrorConstructor.cpp: (JSC::JSC_DEFINE_HOST_FUNCTION): * runtime/ErrorInstance.cpp: (JSC::ErrorInstance::ErrorInstance): (JSC::ErrorInstance::create): (JSC::ErrorInstance::sanitizedMessageString): (JSC::ErrorInstance::sanitizedNameString): (JSC::ErrorInstance::sanitizedToString): * runtime/ErrorInstance.h: (JSC::ErrorInstance::create): (JSC::ErrorInstance::errorType const): * runtime/JSGlobalObjectFunctions.cpp: (JSC::JSC_DEFINE_HOST_FUNCTION): * runtime/NativeErrorConstructor.cpp: (JSC::NativeErrorConstructor<errorType>::constructImpl): (JSC::NativeErrorConstructor<errorType>::callImpl): * runtime/NullSetterFunction.cpp: (JSC::NullSetterFunctionInternal::JSC_DEFINE_HOST_FUNCTION): * wasm/js/JSWebAssemblyCompileError.cpp: (JSC::JSWebAssemblyCompileError::JSWebAssemblyCompileError): * wasm/js/JSWebAssemblyLinkError.cpp: (JSC::JSWebAssemblyLinkError::JSWebAssemblyLinkError): * wasm/js/JSWebAssemblyRuntimeError.cpp: (JSC::JSWebAssemblyRuntimeError::JSWebAssemblyRuntimeError): * wasm/js/WebAssemblyCompileErrorConstructor.cpp: (JSC::JSC_DEFINE_HOST_FUNCTION): * wasm/js/WebAssemblyLinkErrorConstructor.cpp: (JSC::JSC_DEFINE_HOST_FUNCTION): * wasm/js/WebAssemblyRuntimeErrorConstructor.cpp: (JSC::JSC_DEFINE_HOST_FUNCTION): Source/WebCore: This patch implements JS modules in Workers and Worklets. We are not supporting modules in ServiceWorkers' initialization yet. But service-worker can import modules via JS `import()`. The worker can be executed as a module if we pass, `type: "module"` to worker options. Worklet is executed as modules by default. 1. In Worker, we first fetch the initial code. And then, analyze the dependencies and load subsequent modules. We iterate run-loop to load all the dependent modules in the module loader. At that time, we annotate run-loop tasks with special taskMode to iterate tasks with this taskMode. This prevents us from discarding different tasks in this run-loop driving phase. (e.g. postMessage can be called from the main thread while loading module graph, in that case, we should not discard this task.) 2. In Worklet, we just request module loading to ScriptModuleLoader, and run it after loading module graph. This is OK since worklet thread is already running. So we can just request modules and worklet thread automatically drives module loading via run-loop. * Headers.cmake: * Modules/webaudio/AudioWorkletGlobalScope.h: (WebCore::AudioWorkletGlobalScope::currentFrame const): Deleted. (WebCore::AudioWorkletGlobalScope::sampleRate const): Deleted. (WebCore::AudioWorkletGlobalScope::currentTime const): Deleted. * Sources.txt: * WebCore.xcodeproj/project.pbxproj: * bindings/js/CachedModuleScriptLoader.cpp: (WebCore::CachedModuleScriptLoader::create): (WebCore::CachedModuleScriptLoader::CachedModuleScriptLoader): (WebCore::CachedModuleScriptLoader::load): (WebCore::CachedModuleScriptLoader::notifyFinished): * bindings/js/CachedModuleScriptLoader.h: * bindings/js/CachedScriptFetcher.cpp: * bindings/js/JSDOMExceptionHandling.cpp: (WebCore::retrieveErrorMessageWithoutName): (WebCore::createDOMException): * bindings/js/JSDOMExceptionHandling.h: * bindings/js/JSDOMGlobalObject.cpp: (WebCore::scriptModuleLoader): (WebCore::JSDOMGlobalObject::moduleLoaderResolve): (WebCore::JSDOMGlobalObject::moduleLoaderFetch): (WebCore::JSDOMGlobalObject::moduleLoaderEvaluate): (WebCore::JSDOMGlobalObject::moduleLoaderImportModule): (WebCore::JSDOMGlobalObject::moduleLoaderCreateImportMetaProperties): * bindings/js/JSDOMGlobalObject.h: * bindings/js/JSDOMWindowBase.cpp: (WebCore::JSDOMWindowBase::moduleLoaderResolve): Deleted. (WebCore::JSDOMWindowBase::moduleLoaderFetch): Deleted. (WebCore::JSDOMWindowBase::moduleLoaderEvaluate): Deleted. (WebCore::JSDOMWindowBase::moduleLoaderImportModule): Deleted. (WebCore::JSDOMWindowBase::moduleLoaderCreateImportMetaProperties): Deleted. * bindings/js/JSDOMWindowBase.h: * bindings/js/JSWorkerGlobalScopeBase.cpp: * bindings/js/JSWorkletGlobalScopeBase.cpp: * bindings/js/ModuleScriptLoader.h: Copied from Source/WebCore/dom/ModuleFetchParameters.h. (WebCore::ModuleScriptLoader::clearClient): (WebCore::ModuleScriptLoader::scriptFetcher): (WebCore::ModuleScriptLoader::parameters): (WebCore::ModuleScriptLoader::ModuleScriptLoader): * bindings/js/ModuleScriptLoaderClient.h: Renamed from Source/WebCore/bindings/js/CachedModuleScriptLoaderClient.h. * bindings/js/ScriptModuleLoader.cpp: (WebCore::ScriptModuleLoader::ScriptModuleLoader): (WebCore::resolveModuleSpecifier): (WebCore::ScriptModuleLoader::resolve): (WebCore::ScriptModuleLoader::fetch): (WebCore::ScriptModuleLoader::moduleURL): (WebCore::ScriptModuleLoader::responseURLFromRequestURL): (WebCore::ScriptModuleLoader::evaluate): (WebCore::ScriptModuleLoader::importModule): (WebCore::ScriptModuleLoader::notifyFinished): * bindings/js/ScriptModuleLoader.h: * bindings/js/ScriptSourceCode.h: (WebCore::ScriptSourceCode::ScriptSourceCode): * bindings/js/WorkerModuleScriptLoader.cpp: Added. (WebCore::WorkerModuleScriptLoader::create): (WebCore::WorkerModuleScriptLoader::WorkerModuleScriptLoader): (WebCore::WorkerModuleScriptLoader::~WorkerModuleScriptLoader): (WebCore::WorkerModuleScriptLoader::load): (WebCore::WorkerModuleScriptLoader::referrerPolicy): (WebCore::WorkerModuleScriptLoader::notifyFinished): (WebCore::WorkerModuleScriptLoader::taskMode): * bindings/js/WorkerModuleScriptLoader.h: Copied from Source/WebCore/dom/ModuleFetchParameters.h. * bindings/js/WorkerScriptFetcher.h: Added. * dom/Document.cpp: * dom/ExceptionCode.h: * dom/LoadableModuleScript.cpp: (WebCore::LoadableModuleScript::LoadableModuleScript): (WebCore::LoadableModuleScript::load): Deleted. * dom/LoadableModuleScript.h: * dom/ModuleFetchParameters.h: (WebCore::ModuleFetchParameters::create): (WebCore::ModuleFetchParameters::isTopLevelModule const): (WebCore::ModuleFetchParameters::ModuleFetchParameters): * dom/ScriptElement.cpp: (WebCore::ScriptElement::requestModuleScript): * loader/ThreadableLoader.cpp: (WebCore::ThreadableLoader::create): * loader/ThreadableLoader.h: (WebCore::ThreadableLoader::create): * workers/DedicatedWorkerGlobalScope.h: * workers/Worker.cpp: (WebCore::Worker::Worker): (WebCore::Worker::create): (WebCore::Worker::notifyFinished): * workers/Worker.h: * workers/Worker.idl: * workers/WorkerGlobalScope.cpp: (WebCore::WorkerGlobalScope::WorkerGlobalScope): (WebCore::WorkerGlobalScope::importScripts): * workers/WorkerGlobalScope.h: (WebCore::WorkerGlobalScope::credentials const): * workers/WorkerGlobalScopeProxy.h: * workers/WorkerMessagingProxy.cpp: (WebCore::WorkerMessagingProxy::startWorkerGlobalScope): * workers/WorkerMessagingProxy.h: * workers/WorkerOrWorkletGlobalScope.cpp: (WebCore::WorkerOrWorkletGlobalScope::WorkerOrWorkletGlobalScope): * workers/WorkerOrWorkletGlobalScope.h: (WebCore::WorkerOrWorkletGlobalScope::moduleLoader): * workers/WorkerOrWorkletScriptController.cpp: (WebCore::jsValueToModuleKey): (WebCore::WorkerOrWorkletScriptController::evaluateModule): (WebCore::WorkerOrWorkletScriptController::loadModuleSynchronously): (WebCore::WorkerOrWorkletScriptController::linkAndEvaluateModule): (WebCore::WorkerOrWorkletScriptController::loadAndEvaluateModule): * workers/WorkerOrWorkletScriptController.h: * workers/WorkerScriptLoader.cpp: (WebCore::WorkerScriptLoader::loadAsynchronously): (WebCore::WorkerScriptLoader::didReceiveResponse): * workers/WorkerScriptLoader.h: (WebCore::WorkerScriptLoader::responseSource const): (WebCore::WorkerScriptLoader::isRedirected const): * workers/WorkerThread.cpp: (WebCore::WorkerParameters::isolatedCopy const): (WebCore::WorkerThread::evaluateScriptIfNecessary): * workers/WorkerThread.h: * workers/WorkerType.h: * workers/service/ServiceWorkerContainer.h: * workers/service/ServiceWorkerGlobalScope.h: * workers/service/ServiceWorkerJob.cpp: (WebCore::ServiceWorkerJob::fetchScriptWithContext): * workers/service/ServiceWorkerRegistrationOptions.h: * workers/service/context/ServiceWorkerThread.cpp: (WebCore::ServiceWorkerThread::ServiceWorkerThread): * workers/service/server/SWServerWorker.h: * worklets/PaintWorkletGlobalScope.h: (WebCore::PaintWorkletGlobalScope::paintDefinitionMap): Deleted. (WebCore::PaintWorkletGlobalScope::paintDefinitionLock): Deleted. (WebCore::PaintWorkletGlobalScope::~PaintWorkletGlobalScope): Deleted. * worklets/WorkletGlobalScope.cpp: (WebCore::WorkletGlobalScope::fetchAndInvokeScript): (WebCore::WorkletGlobalScope::processNextScriptFetchJobIfNeeded): Deleted. (WebCore::WorkletGlobalScope::didReceiveResponse): Deleted. (WebCore::WorkletGlobalScope::notifyFinished): Deleted. (WebCore::WorkletGlobalScope::didCompleteScriptFetchJob): Deleted. * worklets/WorkletGlobalScope.h: LayoutTests: * TestExpectations: * http/tests/security/contentSecurityPolicy/1.1/module-scriptnonce-redirect-expected.txt: * http/tests/subresource-integrity/sri-module-expected.txt: * webaudio/audioworklet-addModule-failure-expected.txt: * webaudio/worklet-crash-expected.txt: Canonical link: https://commits.webkit.org/234389@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@273203 268f45cc-cd09-0410-ab3c-d52691b4dbfc
1 parent ec29cf1 commit f0caab3

113 files changed

Lines changed: 1575 additions & 525 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

LayoutTests/ChangeLog

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,16 @@
1+
2021-02-19 Yusuke Suzuki <ysuzuki@apple.com>
2+
3+
JS Modules in Workers
4+
https://bugs.webkit.org/show_bug.cgi?id=164860
5+
6+
Reviewed by Saam Barati.
7+
8+
* TestExpectations:
9+
* http/tests/security/contentSecurityPolicy/1.1/module-scriptnonce-redirect-expected.txt:
10+
* http/tests/subresource-integrity/sri-module-expected.txt:
11+
* webaudio/audioworklet-addModule-failure-expected.txt:
12+
* webaudio/worklet-crash-expected.txt:
13+
114
2021-02-19 Rob Buis <rbuis@igalia.com>
215

316
Support aspect-ratio on flexbox items

LayoutTests/TestExpectations

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -640,7 +640,6 @@ fast/dom/connected-subframe-counter-overflow.html [ Slow ]
640640
[ Debug ] http/tests/workers/worker-messageport-2.html [ Slow ]
641641

642642
# Skip workers tests that are timing out or are SharedWorker related only
643-
imported/w3c/web-platform-tests/workers/constructors/Worker/same-origin.html [ Skip ]
644643
imported/w3c/web-platform-tests/workers/data-url-shared.html [ Skip ]
645644
imported/w3c/web-platform-tests/workers/examples/onconnect.any.html [ Skip ]
646645
imported/w3c/web-platform-tests/workers/examples/onconnect.any.worker.html [ Skip ]
@@ -663,7 +662,6 @@ imported/w3c/web-platform-tests/workers/SharedWorker-replace-EventHandler.any.ht
663662
imported/w3c/web-platform-tests/workers/SharedWorker-replace-EventHandler.any.worker.html [ Skip ]
664663
imported/w3c/web-platform-tests/workers/SharedWorker-script-error.html [ Skip ]
665664
imported/w3c/web-platform-tests/workers/SharedWorker-simple.html [ Skip ]
666-
imported/w3c/web-platform-tests/workers/modules/dedicated-worker-import-referrer.html [ Skip ]
667665
imported/w3c/web-platform-tests/workers/modules/dedicated-worker-options-credentials.html [ Skip ]
668666

669667
imported/w3c/web-platform-tests/workers/constructors/SharedWorker [ Skip ]
Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,2 @@
11
CONSOLE MESSAGE: Origin http://127.0.0.1:8000 is not allowed by Access-Control-Allow-Origin.
2-
CONSOLE MESSAGE: TypeError: Cross-origin script load denied by Cross-Origin Resource Sharing policy.
32
This tests whether a deferred script load caused by a redirect is properly allowed by a nonce.

LayoutTests/http/tests/subresource-integrity/sri-module-expected.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ CONSOLE MESSAGE: TypeError: Cannot load script http://127.0.0.1:8000/subresource
33
CONSOLE MESSAGE: TypeError: Cannot load script http://localhost:8000/subresource-integrity/resources/crossorigin-anon-script-module.js. Failed integrity metadata check. Content length: 37, Expected content length: 37, Expected metadata: sha256-deadbeefcSLlbFZCj1OACLxTxVck2TOrBTEdUbwz1yU=
44
CONSOLE MESSAGE: TypeError: Cannot load script http://localhost:8000/subresource-integrity/resources/crossorigin-creds-script-module.js. Failed integrity metadata check. Content length: 38, Expected content length: 38, Expected metadata: sha256-deadbeef2S+pTRZgiw3DWrhC6JLDlt2zRyGpwH7unU8=
55
CONSOLE MESSAGE: Origin http://127.0.0.1:8000 is not allowed by Access-Control-Allow-Origin.
6-
CONSOLE MESSAGE: TypeError: Cross-origin script load denied by Cross-Origin Resource Sharing policy.
76
CONSOLE MESSAGE: TypeError: Cannot load script http://127.0.0.1:8000/subresource-integrity/resources/matching-digest-module.js. Failed integrity metadata check. Content length: 29, Expected content length: 29, Expected metadata: sha256-cWh9nPfm7_mRbKhzarnRYlsJWz5XTNcsqPFzKEx+zSU=
87
CONSOLE MESSAGE: TypeError: Cannot load script http://127.0.0.1:8000/subresource-integrity/resources/matching-digest-module.js. Failed integrity metadata check. Content length: 29, Expected content length: 29, Expected metadata: sha256-U9WYDtBWkcHx13+9UKk/3Q5eoqDc4YGxYb07EPWzb9e=?foo=bar?spam=eggs
98

LayoutTests/imported/w3c/ChangeLog

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,48 @@
1+
2021-02-19 Yusuke Suzuki <ysuzuki@apple.com>
2+
3+
JS Modules in Workers
4+
https://bugs.webkit.org/show_bug.cgi?id=164860
5+
6+
Reviewed by Saam Barati.
7+
8+
Some of worklet failures in WPT is because,
9+
10+
1. Previously, worklet does not support module. These tests are passing incorrectly when modules are not supported.
11+
Now, modules are supported, and some edge features are missing, so start failing
12+
2. WPT is using www1.localhost in some tests (CSP tests), and this is not supported in WebKit's WPT testing. So failing incorrectly.
13+
14+
* web-platform-tests/html/semantics/scripting-1/the-script-element/json-module/non-object.tentative.any.worker-expected.txt:
15+
* web-platform-tests/html/semantics/scripting-1/the-script-element/microtasks/checkpoint-after-workerglobalscope-onerror-module-expected.txt:
16+
* web-platform-tests/html/semantics/scripting-1/the-script-element/module/dynamic-import/alpha/base-url-worker-importScripts-expected.txt:
17+
* web-platform-tests/html/semantics/scripting-1/the-script-element/module/dynamic-import/alpha/base-url-worker.sub-expected.txt:
18+
* web-platform-tests/html/semantics/scripting-1/the-script-element/module/evaluation-order-1-nothrow-worker-expected.txt:
19+
* web-platform-tests/html/semantics/scripting-1/the-script-element/module/evaluation-order-1-worker-expected.txt:
20+
* web-platform-tests/html/semantics/scripting-1/the-script-element/module/evaluation-order-2-import-worker-expected.txt:
21+
* web-platform-tests/html/semantics/scripting-1/the-script-element/module/evaluation-order-3-dynamic-worker-expected.txt:
22+
* web-platform-tests/service-workers/service-worker/import-module-scripts.https-expected.txt:
23+
* web-platform-tests/workers/baseurl/alpha/import-in-moduleworker-expected.txt:
24+
* web-platform-tests/workers/baseurl/alpha/importScripts-in-worker-expected.txt:
25+
* web-platform-tests/workers/baseurl/alpha/xhr-in-moduleworker-expected.txt:
26+
* web-platform-tests/workers/baseurl/alpha/xhr-in-worker-expected.txt:
27+
* web-platform-tests/workers/constructors/Worker/same-origin-expected.txt:
28+
* web-platform-tests/workers/interfaces/WorkerGlobalScope/location/redirect-expected.txt:
29+
* web-platform-tests/workers/interfaces/WorkerGlobalScope/location/redirect-module-expected.txt:
30+
* web-platform-tests/workers/modules/dedicated-worker-import-blob-url.any-expected.txt:
31+
* web-platform-tests/workers/modules/dedicated-worker-import-csp-expected.txt:
32+
* web-platform-tests/workers/modules/dedicated-worker-import-failure-expected.txt:
33+
* web-platform-tests/workers/modules/dedicated-worker-import-meta-expected.txt:
34+
* web-platform-tests/workers/modules/dedicated-worker-import-meta.html:
35+
* web-platform-tests/workers/modules/dedicated-worker-import-referrer-expected.txt:
36+
* web-platform-tests/workers/modules/dedicated-worker-import.any-expected.txt:
37+
* web-platform-tests/workers/modules/dedicated-worker-options-type-expected.txt:
38+
* web-platform-tests/workers/modules/dedicated-worker-parse-error-failure-expected.txt:
39+
* web-platform-tests/workers/name-property-expected.txt:
40+
* web-platform-tests/worklets/audio-worklet-credentials.https-expected.txt:
41+
* web-platform-tests/worklets/audio-worklet-csp.https-expected.txt:
42+
* web-platform-tests/worklets/audio-worklet-import.https-expected.txt:
43+
* web-platform-tests/worklets/audio-worklet-referrer.https-expected.txt:
44+
* web-platform-tests/xhr/open-url-redirected-worker-origin-expected.txt:
45+
146
2021-02-19 Manuel Rego Casasnovas <rego@igalia.com>
247

348
Fix Selenium key code for ENTER in testdriver-vendor.js
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11

2-
FAIL Non-object: null promise_test: Unhandled rejection with value: object "Error: Could not import the module './null.json'."
3-
FAIL Non-object: true promise_test: Unhandled rejection with value: object "Error: Could not import the module './true.json'."
4-
FAIL Non-object: false promise_test: Unhandled rejection with value: object "Error: Could not import the module './false.json'."
5-
FAIL Non-object: string promise_test: Unhandled rejection with value: object "Error: Could not import the module './string.json'."
6-
FAIL Non-object: array promise_test: Unhandled rejection with value: object "Error: Could not import the module './array.json'."
2+
FAIL Non-object: null promise_test: Unhandled rejection with value: object "TypeError: 'application/json' is not a valid JavaScript MIME type."
3+
FAIL Non-object: true promise_test: Unhandled rejection with value: object "TypeError: 'application/json' is not a valid JavaScript MIME type."
4+
FAIL Non-object: false promise_test: Unhandled rejection with value: object "TypeError: 'application/json' is not a valid JavaScript MIME type."
5+
FAIL Non-object: string promise_test: Unhandled rejection with value: object "TypeError: 'application/json' is not a valid JavaScript MIME type."
6+
FAIL Non-object: array promise_test: Unhandled rejection with value: object "TypeError: 'application/json' is not a valid JavaScript MIME type."
77

Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11

2-
Harness Error (TIMEOUT), message = null
3-
2+
FAIL Promise resolved during #report-the-error assert_array_equals: lengths differ, expected array ["handler 1", "handler 2", "handler 1 promise", "handler 2 promise"] length 4, got [] length 0
3+
PASS Promise resolved during event handlers other than error
44

Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11

2-
FAIL Relative URL-like from same-origin importScripts() promise_test: Unhandled rejection with value: object "Error: Could not import the module './import.js?pipe=header(Access-Control-Allow-Origin,*)&label=relative-cross-origin importScripts()'."
3-
FAIL Absolute URL-like from same-origin importScripts() promise_test: Unhandled rejection with value: object "Error: Could not import the module 'http://127.0.0.1:8800/html/semantics/scripting-1/the-script-element/module/dynamic-import/gamma/import.js?pipe=header(Access-Control-Allow-Origin,*)&label=absolute-cross-origin importScripts()'."
4-
PASS Relative URL-like from cross-origin importScripts()
5-
FAIL Absolute URL-like from cross-origin importScripts() promise_test: Unhandled rejection with value: object "Error: Could not import the module 'http://127.0.0.1:8800/html/semantics/scripting-1/the-script-element/module/dynamic-import/gamma/import.js?pipe=header(Access-Control-Allow-Origin,*)&label=absolute-cross-origin importScripts()'."
2+
PASS Relative URL-like from same-origin importScripts()
3+
PASS Absolute URL-like from same-origin importScripts()
4+
FAIL Relative URL-like from cross-origin importScripts() assert_equals: Relative URL-like specifier resolution should fail expected "(unreached)" but got "gamma/import.js"
5+
PASS Absolute URL-like from cross-origin importScripts()
66

Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11

2-
FAIL Relative URL-like from worker top-level script promise_test: Unhandled rejection with value: object "Error: Could not import the module './import.js?pipe=header(Access-Control-Allow-Origin,*)&label=relative-worker top-level script'."
3-
FAIL Absolute URL-like from worker top-level script promise_test: Unhandled rejection with value: object "Error: Could not import the module 'http://127.0.0.1:8800/html/semantics/scripting-1/the-script-element/module/dynamic-import/gamma/import.js?pipe=header(Access-Control-Allow-Origin,*)&label=absolute-worker top-level script'."
2+
PASS Relative URL-like from worker top-level script
3+
PASS Absolute URL-like from worker top-level script
44

Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
11

2-
Harness Error (TIMEOUT), message = null
3-
2+
PASS Test evaluation order of modules
43

0 commit comments

Comments
 (0)