Skip to content

Don't cache HTTP/network errors in the module map - #69559

Merged
webkit-commit-queue merged 1 commit into
WebKit:mainfrom
yoavweiss:module_import_retry
Aug 19, 2026
Merged

webkit-commit-queue merged 1 commit into
WebKit:mainfrom
yoavweiss:module_import_retry

Conversation

@yoavweiss

@yoavweiss yoavweiss commented Jul 16, 2026 •

Copy link
Copy Markdown
Contributor

f324cca

Don't cache HTTP/network errors in the module map
https://bugs.webkit.org/show_bug.cgi?id=319492

Reviewed by Keith Miller.

This implements the spec changes from whatwg/html#10327 to avoid caching HTTP or network module import failures.

No new tests, but lots of progressions.

* LayoutTests/imported/w3c/web-platform-tests/html/semantics/scripting-1/the-script-element/json-module/repeated-imports.any-expected.txt:
* LayoutTests/imported/w3c/web-platform-tests/html/semantics/scripting-1/the-script-element/json-module/repeated-imports.any.sharedworker-expected.txt:
* LayoutTests/imported/w3c/web-platform-tests/html/semantics/scripting-1/the-script-element/json-module/repeated-imports.any.worker-expected.txt:
* LayoutTests/imported/w3c/web-platform-tests/html/semantics/scripting-1/the-script-element/module/concurrent-failed-imports-expected.txt:
* LayoutTests/imported/w3c/web-platform-tests/html/semantics/scripting-1/the-script-element/module/dynamic-import/concurrent-failed-imports.any-expected.txt:
* LayoutTests/imported/w3c/web-platform-tests/html/semantics/scripting-1/the-script-element/module/dynamic-import/concurrent-failed-imports.any.sharedworker-expected.txt:
* LayoutTests/imported/w3c/web-platform-tests/html/semantics/scripting-1/the-script-element/module/dynamic-import/concurrent-failed-imports.any.worker-expected.txt:
* LayoutTests/imported/w3c/web-platform-tests/html/semantics/scripting-1/the-script-element/module/dynamic-import/repeated-imports.any-expected.txt:
* LayoutTests/imported/w3c/web-platform-tests/html/semantics/scripting-1/the-script-element/module/dynamic-import/repeated-imports.any.sharedworker-expected.txt:
* LayoutTests/imported/w3c/web-platform-tests/html/semantics/scripting-1/the-script-element/module/dynamic-import/repeated-imports.any.worker-expected.txt:
* Source/JavaScriptCore/runtime/JSMicrotask.cpp:
(JSC::moduleLoadTopRejected): Avoid registering failed module loads.
(JSC::moduleLoadStoreError): Avoid registering failed module loads.
(JSC::runInternalMicrotask): Avoid registering failed module loads.
(JSC::moduleLoadTopSettled): Avoid registering failed module loads.
* Source/JavaScriptCore/runtime/JSModuleLoader.cpp:
(JSC::JSModuleLoader::loadModule): Remove failed modules.
(JSC::JSModuleLoader::removeFailedFetchEntry):
* Source/JavaScriptCore/runtime/JSModuleLoader.h:
* LayoutTests/imported/w3c/web-platform-tests/html/semantics/scripting-1/the-script-element/module/instantiation-error-8-expected.txt: Added.

Canonical link: https://commits.webkit.org/319474@main

db1b857

Misc iOS, visionOS, tvOS & watchOS macOS Linux Windows
✅ 🧪 style ✅ 🛠 ios ✅ 🛠 mac ✅ 🛠 wpe ✅ 🛠 win
✅ 🛠 ios-sim ✅ 🛠 mac-AS-debug ✅ 🧪 wpe-wk2 ❌ 🧪 win-tests
✅ 🧪 webkitperl ✅ 🧪 ios-wk2 ✅ 🧪 api-mac ✅ 🧪 api-wpe
✅ 🧪 ios-wk2-wpt ✅ 🧪 api-mac-debug ⏳ 🧪 jsc-wpe
✅ 🧪 jsc-x86-64 ✅ 🧪 api-ios ✅ 🧪 mac-wk2 ⏳ 🛠 gtk3-gcc
✅ 🛠 🧪 jsc-debug-arm64 ✅ 🛠 ios-safer-cpp ✅ 🧪 mac-AS-debug-wk2 ✅ 🛠 gtk
✅ 🛠 vision ✅ 🧪 gtk-wk2
✅ 🛠 🧪 merge ✅ 🛠 vision-sim ✅ 🧪 mac-intel-wk2 ✅ 🧪 api-gtk
✅ 🧪 vision-wk2 ✅ 🛠 mac-safer-cpp ✅ 🛠 playstation
✅ 🛠 tv ✅ 🧪 mac-site-isolation
✅ 🛠 tv-sim
✅ 🛠 watch
loading 🛠 watch-sim

@yoavweiss
yoavweiss requested a review from a team as a code owner July 16, 2026 13:39
@yoavweiss yoavweiss self-assigned this Jul 16, 2026
@yoavweiss yoavweiss added the New Bugs Unclassified bugs are placed in this component until the correct component can be determined. label Jul 16, 2026
@yoavweiss
yoavweiss requested a review from annevk July 26, 2026 14:25
@heimskr

heimskr commented Aug 19, 2026

Copy link
Copy Markdown
Contributor

This patch looks good to me, but I don't have reviewer status yet so I can't approve it myself. @kmiller68 could you check over this PR and give approval please?

@kmiller68 kmiller68 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

r=me

Comment on lines +1002 to +1003
Locker locker { cellLock() };
m_moduleMap.remove(iter);

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unrelated but I wish we had a "Single-Owner Mutable" Clang lock analysis Mixin.

@heimskr heimskr added the merge-queue Applied to send a pull request to merge-queue label Aug 19, 2026
https://bugs.webkit.org/show_bug.cgi?id=319492

Reviewed by Keith Miller.

This implements the spec changes from whatwg/html#10327 to avoid caching HTTP or network module import failures.

No new tests, but lots of progressions.

* LayoutTests/imported/w3c/web-platform-tests/html/semantics/scripting-1/the-script-element/json-module/repeated-imports.any-expected.txt:
* LayoutTests/imported/w3c/web-platform-tests/html/semantics/scripting-1/the-script-element/json-module/repeated-imports.any.sharedworker-expected.txt:
* LayoutTests/imported/w3c/web-platform-tests/html/semantics/scripting-1/the-script-element/json-module/repeated-imports.any.worker-expected.txt:
* LayoutTests/imported/w3c/web-platform-tests/html/semantics/scripting-1/the-script-element/module/concurrent-failed-imports-expected.txt:
* LayoutTests/imported/w3c/web-platform-tests/html/semantics/scripting-1/the-script-element/module/dynamic-import/concurrent-failed-imports.any-expected.txt:
* LayoutTests/imported/w3c/web-platform-tests/html/semantics/scripting-1/the-script-element/module/dynamic-import/concurrent-failed-imports.any.sharedworker-expected.txt:
* LayoutTests/imported/w3c/web-platform-tests/html/semantics/scripting-1/the-script-element/module/dynamic-import/concurrent-failed-imports.any.worker-expected.txt:
* LayoutTests/imported/w3c/web-platform-tests/html/semantics/scripting-1/the-script-element/module/dynamic-import/repeated-imports.any-expected.txt:
* LayoutTests/imported/w3c/web-platform-tests/html/semantics/scripting-1/the-script-element/module/dynamic-import/repeated-imports.any.sharedworker-expected.txt:
* LayoutTests/imported/w3c/web-platform-tests/html/semantics/scripting-1/the-script-element/module/dynamic-import/repeated-imports.any.worker-expected.txt:
* Source/JavaScriptCore/runtime/JSMicrotask.cpp:
(JSC::moduleLoadTopRejected): Avoid registering failed module loads.
(JSC::moduleLoadStoreError): Avoid registering failed module loads.
(JSC::runInternalMicrotask): Avoid registering failed module loads.
(JSC::moduleLoadTopSettled): Avoid registering failed module loads.
* Source/JavaScriptCore/runtime/JSModuleLoader.cpp:
(JSC::JSModuleLoader::loadModule): Remove failed modules.
(JSC::JSModuleLoader::removeFailedFetchEntry):
* Source/JavaScriptCore/runtime/JSModuleLoader.h:
* LayoutTests/imported/w3c/web-platform-tests/html/semantics/scripting-1/the-script-element/module/instantiation-error-8-expected.txt: Added.

Canonical link: https://commits.webkit.org/319474@main
@webkit-commit-queue

Copy link
Copy Markdown
Collaborator

Committed 319474@main (f324cca): https://commits.webkit.org/319474@main

Reviewed commits have been landed. Closing PR #69559 and removing active labels.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

New Bugs Unclassified bugs are placed in this component until the correct component can be determined.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants