Bug 1653335 - Replace MakeSpan uses by constructor calls. r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D83817
This commit is contained in:
@@ -360,7 +360,7 @@ nsHtml5StreamParser::SetupDecodingAndWriteSniffingBufferAndCurrentSegment(
|
||||
mUnicodeDecoder = mEncoding->NewDecoderWithBOMRemoval();
|
||||
}
|
||||
if (mSniffingBuffer) {
|
||||
rv = WriteStreamBytes(MakeSpan(mSniffingBuffer.get(), mSniffingLength));
|
||||
rv = WriteStreamBytes(Span(mSniffingBuffer.get(), mSniffingLength));
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
mSniffingBuffer = nullptr;
|
||||
}
|
||||
@@ -506,7 +506,7 @@ void nsHtml5StreamParser::FinalizeSniffingWithDetector(
|
||||
Span<const uint8_t> aFromSegment, uint32_t aCountToSniffingLimit,
|
||||
bool aEof) {
|
||||
if (mSniffingBuffer) {
|
||||
FeedDetector(MakeSpan(mSniffingBuffer.get(), mSniffingLength), false);
|
||||
FeedDetector(Span(mSniffingBuffer.get(), mSniffingLength), false);
|
||||
}
|
||||
if (mFeedChardet && !aFromSegment.IsEmpty()) {
|
||||
// Avoid buffer boundary-dependent behavior.
|
||||
@@ -1516,7 +1516,7 @@ nsresult nsHtml5StreamParser::CopySegmentsToParser(
|
||||
uint32_t aToOffset, uint32_t aCount, uint32_t* aWriteCount) {
|
||||
nsHtml5StreamParser* parser = static_cast<nsHtml5StreamParser*>(aClosure);
|
||||
|
||||
parser->DoDataAvailable(AsBytes(MakeSpan(aFromSegment, aCount)));
|
||||
parser->DoDataAvailable(AsBytes(Span(aFromSegment, aCount)));
|
||||
// Assume DoDataAvailable consumed all available bytes.
|
||||
*aWriteCount = aCount;
|
||||
return NS_OK;
|
||||
|
||||
Reference in New Issue
Block a user