Bug 1255526 - fix import of typed URLs on versions of windows that do not store timestamps, r?MattN draft
authorGijs Kruitbosch <gijskruitbosch@gmail.com>
Fri, 01 Apr 2016 20:43:25 +0100
changeset 346981 fa72b5f58779b7223ecea5ca9d95a5473dca8262
parent 346717 d2d93c1d2ee32c4045ad623a794071d6bf78ea79
child 517521 005b081e02cd96f54271aa89fba836bae2a6d054
push id14463
push usergijskruitbosch@gmail.com
push dateFri, 01 Apr 2016 19:43:36 +0000
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 () {