Bug 1255526 - fix import of typed URLs on versions of windows that do not store timestamps, r=MattN a=lizzard
authorGijs Kruitbosch <gijskruitbosch@gmail.com>
Fri, 01 Apr 2016 20:43:25 +0100
changeset 323777 46a10deb9c422eb88e17abd0a07c11ac074dec5a
parent 323776 35e304886cc36220b2a04c6e1cab374fae6513ea
child 323778 359ec2194f1b529d537b9c4f1a28991e7e6f5dc5
push id5913
push userjlund@mozilla.com
push dateMon, 25 Apr 2016 16:57:49 +0000
treeherdermozilla-beta@dcaf0a6fa115 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersMattN, lizzard
bugs1255526
milestone47.0a2
Bug 1255526 - fix import of typed URLs on versions of windows that do not store timestamps, r=MattN a=lizzard 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 () {