Backed out changeset be054669251a (bug 1425310) for causing browser-chrome leaks on nsStringBuffer.

This commit is contained in:
Cosmin Sabou
2023-04-14 13:26:56 +03:00
parent 5a15e9d601
commit b5ca03ae2b
13 changed files with 101 additions and 245 deletions

View File

@@ -675,12 +675,12 @@ nsresult ScriptLoader::StartLoadInternal(
aRequest->GetScriptLoadContext()->IsTracking()));
if (aRequest->GetScriptLoadContext()->IsLinkPreloadScript()) {
// This is <link rel="preload" as="script"> or <link rel="modulepreload">
// initiated speculative load, put it to the group that is not blocked by
// leaders and doesn't block follower at the same time. Giving it a much
// higher priority will make this request be processed ahead of other
// Unblocked requests, but with the same weight as Leaders. This will make
// us behave similar way for both http2 and http1.
// This is <link rel="preload" as="script"> initiated speculative load,
// put it to the group that is not blocked by leaders and doesn't block
// follower at the same time. Giving it a much higher priority will make
// this request be processed ahead of other Unblocked requests, but with
// the same weight as Leaders. This will make us behave similar way for
// both http2 and http1.
ScriptLoadContext::PrioritizeAsPreload(channel);
ScriptLoadContext::AddLoadBackgroundFlag(channel);
} else if (nsCOMPtr<nsIClassOfService> cos = do_QueryInterface(channel)) {
@@ -786,8 +786,7 @@ nsresult ScriptLoader::StartLoadInternal(
aRequest->mURI, aRequest->CORSMode(), aRequest->mKind);
aRequest->GetScriptLoadContext()->NotifyOpen(
key, channel, mDocument,
aRequest->GetScriptLoadContext()->IsLinkPreloadScript(),
aRequest->IsModuleRequest());
aRequest->GetScriptLoadContext()->IsLinkPreloadScript());
if (aEarlyHintPreloaderId) {
nsCOMPtr<nsIHttpChannelInternal> channelInternal =