Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 76bace0870c361333cc42ae21e89f26cf6f37d2e
      
https://github.com/WebKit/WebKit/commit/76bace0870c361333cc42ae21e89f26cf6f37d2e
  Author: Youenn Fablet <[email protected]>
  Date:   2025-12-12 (Fri, 12 Dec 2025)

  Changed paths:
    M 
LayoutTests/imported/w3c/web-platform-tests/fetch/security/dangling-markup-mitigation-data-url.tentative.sub-expected.txt
    R 
LayoutTests/platform/glib/imported/w3c/web-platform-tests/fetch/security/dangling-markup-mitigation-data-url.tentative.sub-expected.txt
    M LayoutTests/platform/ios/TestExpectations
    M Source/WebCore/loader/cache/CachedResource.cpp
    M Source/WebCore/loader/cache/CachedResource.h
    M Source/WebCore/loader/cache/CachedResourceLoader.cpp

  Log Message:
  -----------
  [iOS] 
imported/w3c/web-platform-tests/fetch/security/dangling-markup-mitigation-data-url.tentative.sub.html
 is a flaky failure
rdar://165165272
https://bugs.webkit.org/show_bug.cgi?id=302901

Reviewed by Alex Christensen.

The load event is fired too soon for documents that reuse a loading subresource 
loader via the memory cache.
Previously, since the load would not trigger a new SubresourceLoader, the 
existing mechanism to wait for loads to finish before firing the load event 
would be broken.

We use the current request count mechanism in CachedResourceLoader as follows:
- When a resource is reused for a load and the resource is loading, we 
increment the request count.
- CachedResourceLoader registers itself to know when the resource is no longer 
loading. When this happens, we decrement the request count and check whether 
the load event should fire.

We introduce in CachedResource a callback mechanism to know when a resource is 
no longer loading.
Covered by test being no longer flaky.

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



To unsubscribe from these emails, change your notification settings at 
https://github.com/WebKit/WebKit/settings/notifications

Reply via email to