Branch: refs/heads/webkitglib/2.46
Home: https://github.com/WebKit/WebKit
Commit: 49f0c1c1be45e82bbc6b2a6d8c66ae653ecfdd23
https://github.com/WebKit/WebKit/commit/49f0c1c1be45e82bbc6b2a6d8c66ae653ecfdd23
Author: Przemyslaw Gorszkowski <[email protected]>
Date: 2025-01-30 (Thu, 30 Jan 2025)
Changed paths:
M Source/WebCore/inspector/NetworkResourcesData.cpp
M Source/WebCore/inspector/NetworkResourcesData.h
Log Message:
-----------
Cherry-pick 289143@main (d84062d7b5e2).
https://bugs.webkit.org/show_bug.cgi?id=284108
[WPE] Increased memory consumption of WebProcess during regular video
playback and RWI
https://bugs.webkit.org/show_bug.cgi?id=284108
Reviewed by Devin Rousso.
When WebInspector is used, the downloaded data is cached also for it in
NetworkResourcesData.
The single resource data cannot be greater than
maximumSingleResourceContentSize (50MB) and
the total size of resources content cannot be greater than
maximumResourcesContentSize (200MB).
At the end of downloading the resource, the binary data is decoded to the
string represantation
(base64 or other depends on decoder). Decoding process can increased the
size of the kept resource
data. The limit maximumSingleResourceContentSize is checked but
maximumResourcesContentSize limit
is not checked which can lead to situation that m_contentSize (the total
size of resources content)
is greater than maximumResourcesContentSize. This causes that condition
checked in
NetworkResourcesData::ensureFreeSpace is invalid because subtraction
unsigned values where
first value(minuend) is smaller than the second one(subtrahend) gives a
huge number (instead of
negative number).
This change ensures that after decoding binary data into string
representation the total size of
resources content (m_contentSize) is not greater than
maximumResourcesContentSize. The assert is
added in NetworkResourcesData::ensureFreeSpace to check that m_contentSize
is not greater than
maximumResourcesContentSize.
I fixed implementation of function NetworkResourcesData::clear in case
passing the preservedLoaderId.
In that case we should update m_requestIdsDeque and m_contentSize and not
just clear them.
Additionally I changed the type of m_requestIdsDeque from Deque<String> to
ListHashSet<String>.
This change fixes adding to m_requestIdsDeque the same requestId many times.
* Source/WebCore/inspector/NetworkResourcesData.cpp:
(WebCore::NetworkResourcesData::ResourceData::decodeDataToContent):
(WebCore::NetworkResourcesData::setResourceContent):
(WebCore::NetworkResourcesData::maybeAddResourceData):
(WebCore::NetworkResourcesData::maybeDecodeDataToContent):
(WebCore::NetworkResourcesData::clear):
(WebCore::NetworkResourcesData::ensureFreeSpace):
* Source/WebCore/inspector/NetworkResourcesData.h:
Canonical link: https://commits.webkit.org/289143@main
Canonical link: https://commits.webkit.org/282416.437@webkitglib/2.46
Commit: 04c4eda8fe5ba250a36080084104ce22ea1a8a4f
https://github.com/WebKit/WebKit/commit/04c4eda8fe5ba250a36080084104ce22ea1a8a4f
Author: Przemyslaw Gorszkowski <[email protected]>
Date: 2025-01-30 (Thu, 30 Jan 2025)
Changed paths:
M Source/WebCore/inspector/NetworkResourcesData.cpp
Log Message:
-----------
Cherry-pick 289547@main (2a3c800a3d23).
https://bugs.webkit.org/show_bug.cgi?id=286678
[WebInspector] assert in NetworkResourcesData with resources containing an
UTF8 NBSP character
https://bugs.webkit.org/show_bug.cgi?id=286678
Reviewed by Devin Rousso.
The assert in NetworkResourcesData::ResourceData::decodeDataToContent is
incorrect because there can be situations that the content after
decoding is smaller than the input, so this assert can be removed.
* Source/WebCore/inspector/NetworkResourcesData.cpp:
(WebCore::NetworkResourcesData::ResourceData::decodeDataToContent):
Canonical link: https://commits.webkit.org/289547@main
Canonical link: https://commits.webkit.org/282416.438@webkitglib/2.46
Compare: https://github.com/WebKit/WebKit/compare/cad47dd1f05a...04c4eda8fe5b
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