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

This commit is contained in:
Andrea Marchesini
2017-10-19 11:39:30 +02:00
parent 9dcf5b085b
commit 304820957d
33 changed files with 138 additions and 123 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);