Bug 1255526 - fix import of typed URLs on versions of windows that do not store timestamps, r=MattN
authorGijs Kruitbosch <gijskruitbosch@gmail.com>
Fri, 01 Apr 2016 20:43:25 +0100
changeset 291460 80bcaeaf909743f1500db6423d3de82f1e10f42b
parent 291459 fd4ef6fe328cfa2a77c9987b10a7e00b711cfaf6
child 291461 7d3eb3e1e13536cf2bc0814727348097f2352b39
push id19656
push usergwagner@mozilla.com
push dateMon, 04 Apr 2016 13:43:23 +0000
treeherderb2g-inbound@e99061fde28a [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersMattN
bugs1255526
milestone48.0a1
Bug 1255526 - fix import of typed URLs on versions of windows that do not store timestamps, r=MattN MozReview-Commit-ID: KSXtQAS7meZ
browser/components/migration/MSMigrationUtils.jsm
--- a/browser/components/migration/MSMigrationUtils.jsm
+++ b/browser/components/migration/MSMigrationUtils.jsm
@@ -705,18 +705,22 @@ function getTypedURLs(registryKeyPath) {
           }
         }
       }
       typedURLs.set(url, timeTyped);
     }
   } catch (ex) {
     Cu.reportError("Error reading typed URL history: " + ex);
   } finally {
-    typedURLKey.close();
-    typedURLTimeKey.close();
+    if (typedURLKey) {
+      typedURLKey.close();
+    }
+    if (typedURLTimeKey) {
+      typedURLTimeKey.close();
+    }
     cTypes.finalize();
   }
   return typedURLs;
 }
 
 
 // Migrator for form passwords on Windows 8 and higher.
 function WindowsVaultFormPasswords () {