Bug 1409327 - NS_NewBufferedInputStream should take the ownership of the inputStream, r=smaug

This commit is contained in:
Andrea Marchesini
2017-10-17 20:38:05 +02:00
parent 47c73656be
commit 715c7ec659
33 changed files with 136 additions and 122 deletions

View File

@@ -352,7 +352,10 @@ nsUrlClassifierPrefixSet::LoadFromFile(nsIFile* aFile)
MAX_BUFFER_SIZE);
// Convert to buffered stream
nsCOMPtr<nsIInputStream> in = NS_BufferInputStream(localInFile, bufferSize);
nsCOMPtr<nsIInputStream> in;
rv = NS_NewBufferedInputStream(getter_AddRefs(in), localInFile.forget(),
bufferSize);
NS_ENSURE_SUCCESS(rv, rv);
rv = LoadPrefixes(in);
NS_ENSURE_SUCCESS(rv, rv);