Bug 1067568 - Intermittent test_filehandle_readonly_exceptions.html | Assertion count 4 is greater than expected (ASSERTION: We don't know anyting about this file handle?!: 'Error', file dom/filehandle/FileService.cpp, line 234); r=bent
authorJan Varga <jan.varga@gmail.com>
Wed, 05 Nov 2014 08:30:21 +0100
changeset 214051 a2b7b389d59380a4dcce0a0eace5e9527cfe9aa6
parent 214050 c12d13fb6570c6eb52d136407f0a955ccbc46c6c
child 214052 ed211a407dde887c2fab6788004ecc655ee635d7
push id27771
push userryanvm@gmail.com
push dateWed, 05 Nov 2014 19:04:24 +0000
treeherdermozilla-central@305b4fecce99 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbent
bugs1067568
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 1067568 - Intermittent test_filehandle_readonly_exceptions.html | Assertion count 4 is greater than expected (ASSERTION: We don't know anyting about this file handle?!: 'Error', file dom/filehandle/FileService.cpp, line 234); r=bent
dom/indexedDB/IDBMutableFile.cpp
--- a/dom/indexedDB/IDBMutableFile.cpp
+++ b/dom/indexedDB/IDBMutableFile.cpp
@@ -316,16 +316,21 @@ IDBMutableFile::Open(FileMode aMode, Err
 {
   MOZ_ASSERT(NS_IsMainThread());
 
   if (QuotaManager::IsShuttingDown() || FileService::IsShuttingDown()) {
     aError.Throw(NS_ERROR_DOM_FILEHANDLE_UNKNOWN_ERR);
     return nullptr;
   }
 
+  if (mInvalidated) {
+    aError.Throw(NS_ERROR_DOM_FILEHANDLE_NOT_ALLOWED_ERR);
+    return nullptr;
+  }
+
   nsRefPtr<IDBFileHandle> fileHandle =
     IDBFileHandle::Create(aMode, FileHandleBase::NORMAL, this);
   if (!fileHandle) {
     aError.Throw(NS_ERROR_DOM_FILEHANDLE_UNKNOWN_ERR);
     return nullptr;
   }
 
   return fileHandle.forget();