You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[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
0 commit comments