Richard Pospesel pushed to branch tor-browser-102.9.0esr-12.0-1 at The Tor Project / Applications / Tor Browser
Commits:
-
3f1f2044
by Rob Wu at 2023-03-14T17:33:20+00:00
-
0553bfb9
by Kash Shampur at 2023-03-14T17:34:35+00:00
2 changed files:
Changes:
... | ... | @@ -1178,14 +1178,6 @@ FetchDriver::OnStartRequest(nsIRequest* aRequest) { |
1178 | 1178 | |
1179 | 1179 | response->InitChannelInfo(channel);
|
1180 | 1180 | |
1181 | - nsCOMPtr<nsIURI> channelURI;
|
|
1182 | - rv = channel->GetURI(getter_AddRefs(channelURI));
|
|
1183 | - if (NS_WARN_IF(NS_FAILED(rv))) {
|
|
1184 | - FailWithNetworkError(rv);
|
|
1185 | - // Cancel request.
|
|
1186 | - return rv;
|
|
1187 | - }
|
|
1188 | - |
|
1189 | 1181 | nsCOMPtr<nsILoadInfo> loadInfo = channel->LoadInfo();
|
1190 | 1182 | // Propagate any tainting from the channel back to our response here. This
|
1191 | 1183 | // step is not reflected in the spec because the spec is written such that
|
... | ... | @@ -1501,7 +1493,7 @@ FetchDriver::AsyncOnChannelRedirect(nsIChannel* aOldChannel, |
1501 | 1493 | // Response.redirected to true if an internal redirect occurs. These
|
1502 | 1494 | // should be transparent to script.
|
1503 | 1495 | nsCOMPtr<nsIURI> uri;
|
1504 | - MOZ_ALWAYS_SUCCEEDS(aNewChannel->GetURI(getter_AddRefs(uri)));
|
|
1496 | + MOZ_ALWAYS_SUCCEEDS(NS_GetFinalChannelURI(aNewChannel, getter_AddRefs(uri)));
|
|
1505 | 1497 | |
1506 | 1498 | nsCOMPtr<nsIURI> uriClone;
|
1507 | 1499 | nsresult rv = NS_GetURIWithoutRef(uri, getter_AddRefs(uriClone));
|
... | ... | @@ -1088,6 +1088,12 @@ class ProfileChunkedBuffer { |
1088 | 1088 | MOZ_ASSERT(maybeEntryWriter->RemainingBytes() == blockBytes);
|
1089 | 1089 | mRangeEnd += blockBytes;
|
1090 | 1090 | mPushedBlockCount += aBlockCount;
|
1091 | + } else if (blockBytes >= current->BufferBytes()) {
|
|
1092 | + // Currently only two buffer chunks are held at a time and it is not
|
|
1093 | + // possible to write an object that takes up more space than this. In
|
|
1094 | + // this scenario, silently discard this block of data if it is unable
|
|
1095 | + // to fit into the two reserved profiler chunks.
|
|
1096 | + mFailedPutBytes += blockBytes;
|
|
1091 | 1097 | } else {
|
1092 | 1098 | // Block doesn't fit fully in current chunk, it needs to overflow into
|
1093 | 1099 | // the next one.
|