Bug 1367560 - Remove an assertion from the Directory constructor that the directory exists on disk from DEBUG builds; r?baku
As long as Directory objects can be constructed in the content process, trying
to access the file system conceptually does not make sense because of
sandboxing. The canary in the coal mine for this was tests which started
crashing on Directory construction as we further locked down read access in the
sandbox.
MozReview-Commit-ID: HZitALYpO5H
--- a/dom/filesystem/Directory.cpp
+++ b/dom/filesystem/Directory.cpp
@@ -81,22 +81,16 @@ Directory::Constructor(const GlobalObjec
/* static */ already_AddRefed<Directory>
Directory::Create(nsISupports* aParent, nsIFile* aFile,
FileSystemBase* aFileSystem)
{
MOZ_ASSERT(aParent);
MOZ_ASSERT(aFile);
-#ifdef DEBUG
- bool isDir;
- nsresult rv = aFile->IsDirectory(&isDir);
- MOZ_ASSERT(NS_SUCCEEDED(rv) && isDir);
-#endif
-
RefPtr<Directory> directory = new Directory(aParent, aFile, aFileSystem);
return directory.forget();
}
Directory::Directory(nsISupports* aParent,
nsIFile* aFile,
FileSystemBase* aFileSystem)
: mParent(aParent)