Bug 1367560 - Remove an assertion from the Directory constructor that the directory exists on disk from DEBUG builds; r=baku
authorAlex Gaynor <agaynor@mozilla.com>
Tue, 06 Jun 2017 10:15:13 -0400
changeset 413086 6a8333a5941e8c5ef68607fd70e0746af872c57d
parent 413085 c27161891c66b52f2771e483f683290ff058710c
child 413087 f6320f91851c2cede08b0fb54a6d0525b870310e
push id1490
push usermtabara@mozilla.com
push dateMon, 31 Jul 2017 14:08:16 +0000
treeherdermozilla-release@70e32e6bf15e [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbaku
bugs1367560
milestone55.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
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
dom/filesystem/Directory.cpp
--- 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)