mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-25 05:41:12 +00:00
Bug 1701794 - Use nsOSHelperAppServiceChild with Windows r=nika,haik
Currently, the Windows implemenation of nsOSHelperAppService uses COM to figure out MIME types and extension associations. That is incompatible with Win32k lockdown. Luckily, Haik already made a class that handles these calls in content process and either marks them as unimplemented or-else forwards them to the main process. This seems to work fine on Windows, so it looks like all that needs to be done is adding XP_WIN to a couple of #ifdefs and we're good to go! Differential Revision: https://phabricator.services.mozilla.com/D118391
This commit is contained in:
parent
3a387e8175
commit
44cf790576
@ -321,7 +321,7 @@ mozilla::ipc::IPCResult HandlerServiceParent::RecvExistsForProtocol(
|
||||
*aHandlerExists = false;
|
||||
return IPC_OK();
|
||||
}
|
||||
#if defined(XP_MACOSX)
|
||||
#if defined(XP_MACOSX) || defined(XP_WIN)
|
||||
// Check the datastore and fallback to an OS check.
|
||||
// ExternalProcotolHandlerExists() does the fallback.
|
||||
nsresult rv;
|
||||
|
@ -638,7 +638,7 @@ static StaticRefPtr<nsExternalHelperAppService> sExtHelperAppSvcSingleton;
|
||||
already_AddRefed<nsExternalHelperAppService>
|
||||
nsExternalHelperAppService::GetSingleton() {
|
||||
if (!sExtHelperAppSvcSingleton) {
|
||||
#ifdef XP_MACOSX
|
||||
#if defined(XP_MACOSX) || defined(XP_WIN)
|
||||
if (XRE_IsParentProcess()) {
|
||||
sExtHelperAppSvcSingleton = new nsOSHelperAppService();
|
||||
} else {
|
||||
@ -646,7 +646,7 @@ nsExternalHelperAppService::GetSingleton() {
|
||||
}
|
||||
#else
|
||||
sExtHelperAppSvcSingleton = new nsOSHelperAppService();
|
||||
#endif /* XP_MACOSX */
|
||||
#endif // defined(XP_MACOSX) || defined(XP_WIN)
|
||||
ClearOnShutdown(&sExtHelperAppSvcSingleton);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user