Bug 1282680 Always use 64-bit registry for native messaging r?kmag
MozReview-Commit-ID: 99JSqHP17v8
--- 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);
},