Bug 762203 - 'Potential crash in IDBObjectStore::UpdateIndexes'. r=khuey.
authorBen Turner <bent.mozilla@gmail.com>
Wed, 06 Jun 2012 14:02:03 -0700
changeset 95962 af1e2967c7e89d534e950f8d65c0ce0fde370c5f
parent 95961 794751c0c8f46173d49f8ad8b46656f02001cac2
child 95963 c779db92fef21901a5734925924147d132451834
push id22865
push userbturner@mozilla.com
push dateWed, 06 Jun 2012 21:02:09 +0000
treeherdermozilla-central@af1e2967c7e8 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerskhuey
bugs762203
milestone16.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 762203 - 'Potential crash in IDBObjectStore::UpdateIndexes'. r=khuey.
dom/indexedDB/IDBObjectStore.cpp
--- a/dom/indexedDB/IDBObjectStore.cpp
+++ b/dom/indexedDB/IDBObjectStore.cpp
@@ -832,16 +832,17 @@ IDBObjectStore::UpdateIndexes(IDBTransac
   NS_NAMED_LITERAL_CSTRING(objectDataId, "object_data_id");
 
   if (aOverwrite) {
     stmt = aTransaction->GetCachedStatement(
       "DELETE FROM unique_index_data "
       "WHERE object_data_id = :object_data_id; "
       "DELETE FROM index_data "
       "WHERE object_data_id = :object_data_id");
+    NS_ENSURE_TRUE(stmt, NS_ERROR_FAILURE);
 
     mozStorageStatementScoper scoper(stmt);
 
     rv = stmt->BindInt64ByName(objectDataId, aObjectDataId);
     NS_ENSURE_SUCCESS(rv, rv);
 
     rv = stmt->Execute();
     NS_ENSURE_SUCCESS(rv, rv);