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

@@ -336,27 +336,6 @@ nsIContentHandle* nsHtml5TreeBuilder::createElement(
}
// Other "as" values will be supported later.
}
} else if (mozilla::StaticPrefs::network_modulepreload() &&
rel.LowerCaseEqualsASCII("modulepreload")) {
nsHtml5String url =
aAttributes->getValue(nsHtml5AttributeName::ATTR_HREF);
if (url && url.Length() != 0) {
nsHtml5String charset =
aAttributes->getValue(nsHtml5AttributeName::ATTR_CHARSET);
nsHtml5String type = nsHtml5String::FromLiteral("module");
nsHtml5String crossOrigin = aAttributes->getValue(
nsHtml5AttributeName::ATTR_CROSSORIGIN);
nsHtml5String media =
aAttributes->getValue(nsHtml5AttributeName::ATTR_MEDIA);
nsHtml5String integrity =
aAttributes->getValue(nsHtml5AttributeName::ATTR_INTEGRITY);
nsHtml5String referrerPolicy = aAttributes->getValue(
nsHtml5AttributeName::ATTR_REFERRERPOLICY);
mSpeculativeLoadQueue.AppendElement()->InitScript(
url, charset, type, crossOrigin, media, integrity,
referrerPolicy, mode == nsHtml5TreeBuilder::IN_HEAD, false,
false, false, true);
}
}
}
} else if (nsGkAtoms::video == aName) {