Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 1bc34fec49a7803958a657dc81c1d9a9d9bbd315
      
https://github.com/WebKit/WebKit/commit/1bc34fec49a7803958a657dc81c1d9a9d9bbd315
  Author: Przemyslaw Gorszkowski <[email protected]>
  Date:   2025-04-10 (Thu, 10 Apr 2025)

  Changed paths:
    M Source/WTF/Scripts/Preferences/UnifiedWebPreferences.yaml
    M Source/WebCore/inspector/InspectorFrontendHost.cpp
    M Source/WebCore/inspector/NetworkResourcesData.cpp
    M Source/WebCore/inspector/NetworkResourcesData.h
    M Source/WebCore/inspector/agents/InspectorNetworkAgent.cpp
    M Source/WebCore/inspector/agents/InspectorNetworkAgent.h
    M Source/WebCore/inspector/agents/page/PageNetworkAgent.cpp
    M Source/WebCore/inspector/agents/worker/WorkerNetworkAgent.cpp

  Log Message:
  -----------
  [WebInspector] minimize the number of data kept in 
m_requestIdToResourceDataMap after content eviction
https://bugs.webkit.org/show_bug.cgi?id=290161

Reviewed by Devin Rousso.

After eviction of the content of the resource data due to exceeding the
threshold for maximum memory usage for gathered resources, WebKit still
keeps the structure of resource data in `m_requestIdToResourceDataMap`
because it is the primary structure used to track all other metadata
used by Web Inspector.
We can minimize the data kept there after eviction by resetting the
decoder which is not needed if we remove the content of resource data.

Additionally in case of platforms different than Cocoa we can skip
storing the certificate info because it is not used. The certificate
info is used only if supportsShowCertificate(), which is true only in
case of Cocoa platform.

This change adds a web preference `InspectorSupportsShowingCertificate` which
is true only in case of Cocoa and Win platform and enabling storing of the
certificate info for resource data in Web Inspector.

* Source/WTF/Scripts/Preferences/UnifiedWebPreferences.yaml:
* Source/WebCore/inspector/InspectorFrontendHost.cpp:
(WebCore::InspectorFrontendHost::supportsShowCertificate const):
* Source/WebCore/inspector/NetworkResourcesData.cpp:
(WebCore::NetworkResourcesData::ResourceData::evictContent):
(WebCore::NetworkResourcesData::NetworkResourcesData):
(WebCore::NetworkResourcesData::responseReceived):
(WebCore::NetworkResourcesData::setResourceContent):
(WebCore::NetworkResourcesData::maybeAddResourceData):
(WebCore::NetworkResourcesData::maybeDecodeDataToContent):
(WebCore::NetworkResourcesData::ensureFreeSpace):
* Source/WebCore/inspector/NetworkResourcesData.h:
(WebCore::NetworkResourcesData::Settings::Settings):
* Source/WebCore/inspector/agents/InspectorNetworkAgent.cpp:
(WebCore::InspectorNetworkAgent::InspectorNetworkAgent):
* Source/WebCore/inspector/agents/InspectorNetworkAgent.h:
* Source/WebCore/inspector/agents/page/PageNetworkAgent.cpp:
(WebCore::PageNetworkAgent::PageNetworkAgent):
* Source/WebCore/inspector/agents/worker/WorkerNetworkAgent.cpp:
(WebCore::WorkerNetworkAgent::WorkerNetworkAgent):

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



To unsubscribe from these emails, change your notification settings at 
https://github.com/WebKit/WebKit/settings/notifications
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to