Bug 1068933 Backed out changeset e5e33d14ee28. forgot r=janv
authorDave Hylands <dhylands@mozilla.com>
Fri, 24 Oct 2014 13:09:46 -0700
changeset 212266 9fa73a2c4c2bc9af81c5bc10757c01f89acac64f
parent 212265 e5e33d14ee287859a637c1c9a9ed24e1cd603084
child 212267 12d4584713e56eb08cb8b914fae64bc9488dbc42
push id27703
push userkwierso@gmail.com
push dateSat, 25 Oct 2014 00:03:56 +0000
treeherdermozilla-central@e8a6f40728b7 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjanv
bugs1068933
milestone36.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 1068933 Backed out changeset e5e33d14ee28. forgot r=janv
dom/devicestorage/nsDeviceStorage.cpp
dom/devicestorage/test/test_lastModificationFilter.html
--- a/dom/devicestorage/nsDeviceStorage.cpp
+++ b/dom/devicestorage/nsDeviceStorage.cpp
@@ -1460,31 +1460,29 @@ DeviceStorageFile::collectFilesInternal(
     return;
   }
 
   nsCOMPtr<nsIDirectoryEnumerator> files = do_QueryInterface(e);
   nsCOMPtr<nsIFile> f;
 
   while (NS_SUCCEEDED(files->GetNextFile(getter_AddRefs(f))) && f) {
 
-    bool isFile;
-    f->IsFile(&isFile);
-
-    if (isFile) {
-      PRTime msecs;
-      f->GetLastModifiedTime(&msecs);
-
-      if (msecs < aSince) {
-        continue;
-      }
+    PRTime msecs;
+    f->GetLastModifiedTime(&msecs);
+
+    if (msecs < aSince) {
+      continue;
     }
 
     bool isDir;
     f->IsDirectory(&isDir);
 
+    bool isFile;
+    f->IsFile(&isFile);
+
     nsString fullpath;
     nsresult rv = f->GetPath(fullpath);
     if (NS_FAILED(rv)) {
       continue;
     }
 
     if (!StringBeginsWith(fullpath, aRootPath)) {
       NS_ERROR("collectFiles returned a path that does not belong!");
--- a/dom/devicestorage/test/test_lastModificationFilter.html
+++ b/dom/devicestorage/test/test_lastModificationFilter.html
@@ -18,24 +18,20 @@ https://bugzilla.mozilla.org/show_bug.cg
 <p id="display"></p>
 <div id="content" style="display: none">
   
 </div>
 <pre id="test">
 <script class="testbody" type="text/javascript">
 
 devicestorage_setup();
-// We put the old files in 2 levels deep. When you add a file to a directory
-// it will modify the parents last modification time, but not the parents
-// parents. So we want to make sure that even though x's timestamp is earlier
-// than the since parameter, we still pick up the later files.
-var oldFiles = ["x/y/aa.png", "x/y/ab.png", "x/y/ac.png"];
+
+var oldFiles = ["a.png", "b.png", "c.png"];
 var timeFile = "t.png";
-var newFiles = ["x/y/ad.png", "x/y/ae.png", "x/y/af.png", // new files in old dir
-                "z/bd.png", "z/be.png", "z/bf.png"];      // new files in new dir
+var newFiles = ["d.png", "e.png", "f.png"];
 
 var storage = navigator.getDeviceStorage('pictures');
 var prefix = "devicestorage/" + randomFilename(12);
 var i;
 var timestamp;
 var lastFileAddedTimestamp;
 
 function verifyAndDelete(prefix, files, e) {