Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: d9c65d67a7baa9cf61cd6180fd0f74e2f84706f8
      
https://github.com/WebKit/WebKit/commit/d9c65d67a7baa9cf61cd6180fd0f74e2f84706f8
  Author: Ahmad Saleem <[email protected]>
  Date:   2026-07-27 (Mon, 27 Jul 2026)

  Changed paths:
    A 
LayoutTests/http/tests/inspector/network/clear-non-buffered-resource-data-on-navigate-expected.txt
    A 
LayoutTests/http/tests/inspector/network/clear-non-buffered-resource-data-on-navigate.html
    M LayoutTests/platform/mac-site-isolation/TestExpectations
    M Source/WebCore/inspector/NetworkResourcesData.cpp

  Log Message:
  -----------
  [Web Inspector] resource data for non-buffered resources leaks across 
navigations
https://bugs.webkit.org/show_bug.cgi?id=318430
rdar://181210169

Reviewed by Devin Rousso.

NetworkResourcesData::clear(preservedLoaderId) only walked m_requestIdsDeque
when preserving a loader on navigation. A resource enters that deque solely
when its content is buffered, so resources tracked in the request-id map that
never buffered content (e.g. non-text subresources such as images) were never
visited: their entries for the previous loader survived every navigation and
leaked until the next full clear.

After rebuilding the deque, removeIf() over m_requestIdToResourceDataMap to
evict and remove any remaining entries not belonging to the preserved loader.

Test: 
http/tests/inspector/network/clear-non-buffered-resource-data-on-navigate.html

* 
LayoutTests/http/tests/inspector/network/clear-non-buffered-resource-data-on-navigate-expected.txt:
 Added.
* 
LayoutTests/http/tests/inspector/network/clear-non-buffered-resource-data-on-navigate.html:
 Added.
* Source/WebCore/inspector/NetworkResourcesData.cpp:
(WebCore::NetworkResourcesData::clear):

* LayoutTests/platform/mac-site-isolation/TestExpectations: Mark the new test 
as an
expected failure; getResponseBody cannot resolve a non-buffered resource's body 
under
Site Isolation, which trips the test's pre-navigation sanity check.

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



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

Reply via email to