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 208340 da78e23cbe3d
parent 208339 d2714b6fc28d
child 208341 90b5e0b87666
push id3831
push userryanvm@gmail.com
push date2014-08-19 22:04 +0000
treeherdermozilla-beta@7c7145e95cb5 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmak, test-only
bugs1024686
milestone32.0
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
@@ -178,16 +178,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));