[webkit-changes] [WebKit/WebKit] 56c573: module loader fetch should queue macro-task

Yusuke Suzuki noreply at github.com
Wed Nov 2 09:12:35 PDT 2022


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 56c57359f47b7e84c11150fcb8e5d4ac1be0b175
      https://github.com/WebKit/WebKit/commit/56c57359f47b7e84c11150fcb8e5d4ac1be0b175
  Author: Yusuke Suzuki <ysuzuki at apple.com>
  Date:   2022-11-02 (Wed, 02 Nov 2022)

  Changed paths:
    M LayoutTests/imported/w3c/web-platform-tests/html/semantics/scripting-1/the-script-element/module/dynamic-import/delay-load-event-expected.txt
    M LayoutTests/platform/mac/TestExpectations
    M Source/WebCore/bindings/js/ScriptModuleLoader.cpp

  Log Message:
  -----------
  module loader fetch should queue macro-task
https://bugs.webkit.org/show_bug.cgi?id=246355
rdar://101044632

Reviewed by Mark Lam and Alexey Shvayka.

Since module loader is using `fetch` internally in the spec, every fetch should be resolved via macro-task.
This patch does it via context.eventLoop().queueTask to fix flaky import-maps tests.

* LayoutTests/imported/w3c/web-platform-tests/html/semantics/scripting-1/the-script-element/module/dynamic-import/delay-load-event-expected.txt:
* LayoutTests/platform/mac/TestExpectations:
* Source/WebCore/bindings/js/ScriptModuleLoader.cpp:
(WebCore::rejectToPropagateNetworkError):
(WebCore::rejectWithFetchError):
(WebCore::ScriptModuleLoader::fetch):
(WebCore::rejectPromise):
(WebCore::ScriptModuleLoader::importModule):
(WebCore::ScriptModuleLoader::notifyFinished):

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




More information about the webkit-changes mailing list