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 362537 6a8333a5941e
parent 362536 c27161891c66
child 362612 f6320f91851c
push id44198
push userryanvm@gmail.com
push dateTue, 06 Jun 2017 16:43:24 +0000
treeherderautoland@6a8333a5941e [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)