Bug 1282680 Always use 64-bit registry for native messaging r?kmag draft
authorAndrew Swan <aswan@mozilla.com>
Mon, 18 Jul 2016 13:34:19 -0700
changeset 389255 749ede860b999ab393de47b2391320d2d47384aa
parent 389110 69a9474a32061e0afc22ad93f0683934cff0c531
child 525693 739bee18ffb416e5d24fe26579bcf2097f19b241
push id23339
push useraswan@mozilla.com
push dateMon, 18 Jul 2016 21:41:09 +0000
reviewerskmag
bugs1282680
milestone50.0a1
Bug 1282680 Always use 64-bit registry for native messaging r?kmag MozReview-Commit-ID: 99JSqHP17v8
toolkit/components/extensions/NativeMessaging.jsm
--- a/toolkit/components/extensions/NativeMessaging.jsm
+++ b/toolkit/components/extensions/NativeMessaging.jsm
@@ -79,22 +79,23 @@ this.HostManifestManager = {
         throw new Error(`Native messaging is not supported on ${AppConstants.platform}`);
       }
       this._initializePromise = Schemas.load(HOST_MANIFEST_SCHEMA);
     }
     return this._initializePromise;
   },
 
   _winLookup(application, context) {
+    const REGISTRY = Ci.nsIWindowsRegKey;
     let regPath = `${REGPATH}\\${application}`;
-    let path = WindowsRegistry.readRegKey(Ci.nsIWindowsRegKey.ROOT_KEY_CURRENT_USER,
-                                          regPath, "");
+    let path = WindowsRegistry.readRegKey(REGISTRY.ROOT_KEY_CURRENT_USER,
+                                          regPath, "", REGISTRY.WOW64_64);
     if (!path) {
       path = WindowsRegistry.readRegKey(Ci.nsIWindowsRegKey.ROOT_KEY_LOCAL_MACHINE,
-                                        regPath, "");
+                                        regPath, "", REGISTRY.WOW64_64);
     }
     if (!path) {
       return null;
     }
     return this._tryPath(path, application, context)
       .then(manifest => manifest ? {path, manifest} : null);
   },