mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-10 11:55:49 +00:00
sprinkle some asserts, and remove redundant #include.
This commit is contained in:
parent
7f24d7f4e8
commit
bdf2a2307d
@ -935,6 +935,7 @@ nsPermissionManager::Write()
|
||||
// All went ok. Maybe except for problems in Write(), but the stream detects
|
||||
// that for us
|
||||
nsCOMPtr<nsISafeOutputStream> safeStream = do_QueryInterface(bufferedOutputStream);
|
||||
NS_ASSERTION(safeStream, "expected a safe output stream!");
|
||||
if (safeStream) {
|
||||
rv = safeStream->Finish();
|
||||
if (NS_FAILED(rv)) {
|
||||
|
@ -45,7 +45,6 @@
|
||||
#include "nsNetUtil.h"
|
||||
#include "nsIFile.h"
|
||||
#include "nsILocalFile.h"
|
||||
#include "nsISafeOutputStream.h"
|
||||
#include "nsIObserverService.h"
|
||||
#include "nsPrefBranch.h"
|
||||
#include "nsXPIDLString.h"
|
||||
@ -530,6 +529,7 @@ nsresult nsPrefService::WritePrefFile(nsIFile* aFile)
|
||||
// tell the safe output stream to overwrite the real prefs file
|
||||
// (it'll abort if there were any errors during writing)
|
||||
nsCOMPtr<nsISafeOutputStream> safeStream = do_QueryInterface(outStream);
|
||||
NS_ASSERTION(safeStream, "expected a safe output stream!");
|
||||
if (safeStream) {
|
||||
rv = safeStream->Finish();
|
||||
if (NS_FAILED(rv)) {
|
||||
|
@ -1115,6 +1115,7 @@ nsCookieService::Write()
|
||||
// All went ok. Maybe except for problems in Write(), but the stream detects
|
||||
// that for us
|
||||
nsCOMPtr<nsISafeOutputStream> safeStream = do_QueryInterface(bufferedOutputStream);
|
||||
NS_ASSERTION(safeStream, "expected a safe output stream!");
|
||||
if (safeStream) {
|
||||
rv = safeStream->Finish();
|
||||
if (NS_FAILED(rv)) {
|
||||
|
Loading…
Reference in New Issue
Block a user