commit 8fcfdc31706b47475b09cd0a9dce75151eb16c8c
parent 067df2781ede4416a335aed0e36a5765bccc337a
Author: Randell Jesup <rjesup@mozilla.com>
Date: Thu, 4 Dec 2025 14:47:48 +0000
Bug 2003980: pass decodedBodySize down to the content process r=necko-reviewers,valentin
This is needed because Dictionary-compressed resources (and items marked as dictionaries)
are decompressed in the parent process
Differential Revision: https://phabricator.services.mozilla.com/D275034
Diffstat:
4 files changed, 6 insertions(+), 2 deletions(-)
diff --git a/netwerk/ipc/NeckoChannelParams.ipdlh b/netwerk/ipc/NeckoChannelParams.ipdlh
@@ -603,6 +603,7 @@ struct ResourceTimingStructArgs {
TimeStamp redirectEnd;
uint64_t transferSize;
uint64_t encodedBodySize;
+ uint64_t decodedBodySize;
// Not actually part of resource timing, but not part of the transaction
// timings either. These need to be passed to HttpChannelChild along with
diff --git a/netwerk/protocol/http/HttpChannelChild.cpp b/netwerk/protocol/http/HttpChannelChild.cpp
@@ -892,6 +892,7 @@ void HttpChannelChild::ProcessOnStopRequest(
MutexAutoLock lock(mOnDataFinishedMutex);
mTransferSize = aTiming.transferSize();
mEncodedBodySize = aTiming.encodedBodySize();
+ mDecodedBodySize = aTiming.decodedBodySize();
}
if (StaticPrefs::network_send_OnDataFinished()) {
diff --git a/netwerk/protocol/http/HttpChannelParent.cpp b/netwerk/protocol/http/HttpChannelParent.cpp
@@ -1108,8 +1108,9 @@ static ResourceTimingStructArgs GetTimingAttributes(HttpBaseChannel* aChannel) {
aChannel->GetEncodedBodySize(&size);
args.encodedBodySize() = size;
- // decodedBodySize can be computed in the child process so it doesn't need
- // to be passed down.
+
+ aChannel->GetDecodedBodySize(&size);
+ args.decodedBodySize() = size;
aChannel->GetCacheReadStart(&timeStamp);
args.cacheReadStart() = timeStamp;
diff --git a/netwerk/protocol/http/HttpTransactionChild.cpp b/netwerk/protocol/http/HttpTransactionChild.cpp
@@ -490,6 +490,7 @@ ResourceTimingStructArgs HttpTransactionChild::GetTimingAttributes() {
args.responseEnd() = mTransaction->GetResponseEnd();
args.transferSize() = mTransaction->GetTransferSize();
args.encodedBodySize() = mLogicalOffset;
+ args.decodedBodySize() = 0;
args.redirectStart() = mRedirectStart;
args.redirectEnd() = mRedirectEnd;
args.transferSize() = mTransaction->GetTransferSize();