Bug 1024686 - Add missing return in Sqlite.jsm. r=mak, a=test-only
authorDavid Rajchenbach-Teller <dteller@mozilla.com>
Thu, 12 Jun 2014 12:53:00 -0400
changeset 216440 b0b83df25858eacb8f423ac4124b6a2dba038f34
parent 216439 bb86cb586fa9d55c157ee1855c46f1c2856d15da
child 216441 610ce6c690f964e9d08af416daaf3b85a3aa1ce6
push id3857
push userraliiev@mozilla.com
push dateTue, 02 Sep 2014 16:39:23 +0000
treeherdermozilla-beta@5638b907b505 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmak, test-only
bugs1024686
milestone33.0a2
Bug 1024686 - Add missing return in Sqlite.jsm. r=mak, a=test-only
toolkit/modules/Sqlite.jsm
--- a/toolkit/modules/Sqlite.jsm
+++ b/toolkit/modules/Sqlite.jsm
@@ -736,16 +736,17 @@ function openConnection(options) {
     options = Cc["@mozilla.org/hash-property-bag;1"].
       createInstance(Ci.nsIWritablePropertyBag);
     options.setProperty("shared", false);
   }
   Services.storage.openAsyncDatabase(file, options, function(status, connection) {
     if (!connection) {
       log.warn("Could not open connection: " + status);
       deferred.reject(new Error("Could not open connection: " + status));
+      return;
     }
     log.info("Connection opened");
     try {
       deferred.resolve(
         new OpenedConnection(connection.QueryInterface(Ci.mozIStorageAsyncConnection), basename, number,
         openedOptions));
     } catch (ex) {
       log.warn("Could not open database: " + CommonUtils.exceptionStr(ex));