зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1589082 - make it clear we don't implement getProtocolHandlerInfoFromOS in the child service on mac, r=haik
Differential Revision: https://phabricator.services.mozilla.com/D52364 --HG-- extra : moz-landing-system : lando
This commit is contained in:
Родитель
5b02d71498
Коммит
66ef0ce7db
|
@ -48,7 +48,7 @@ nsresult nsOSHelperAppServiceChild::ExternalProtocolHandlerExists(
|
||||||
*aHandlerExists = false;
|
*aHandlerExists = false;
|
||||||
rv = handlerSvc->ExistsForProtocol(scheme, aHandlerExists);
|
rv = handlerSvc->ExistsForProtocol(scheme, aHandlerExists);
|
||||||
LOG(
|
LOG(
|
||||||
("nsOSHelperAppServiceChild::OSProtocolHandlerExists(): "
|
("nsOSHelperAppServiceChild::ExternalProtocolHandlerExists(): "
|
||||||
"protocol: %s, result: %" PRId32,
|
"protocol: %s, result: %" PRId32,
|
||||||
aProtocolScheme, static_cast<uint32_t>(rv)));
|
aProtocolScheme, static_cast<uint32_t>(rv)));
|
||||||
mozilla::Unused << NS_WARN_IF(NS_FAILED(rv));
|
mozilla::Unused << NS_WARN_IF(NS_FAILED(rv));
|
||||||
|
@ -117,30 +117,7 @@ nsOSHelperAppServiceChild::GetMIMEInfoFromOS(const nsACString& aMIMEType,
|
||||||
NS_IMETHODIMP
|
NS_IMETHODIMP
|
||||||
nsOSHelperAppServiceChild::GetProtocolHandlerInfoFromOS(
|
nsOSHelperAppServiceChild::GetProtocolHandlerInfoFromOS(
|
||||||
const nsACString& aScheme, bool* aFound, nsIHandlerInfo** aRetVal) {
|
const nsACString& aScheme, bool* aFound, nsIHandlerInfo** aRetVal) {
|
||||||
MOZ_ASSERT(!aScheme.IsEmpty(), "No scheme was specified!");
|
return NS_ERROR_NOT_IMPLEMENTED;
|
||||||
|
|
||||||
nsresult rv =
|
|
||||||
OSProtocolHandlerExists(PromiseFlatCString(aScheme).get(), aFound);
|
|
||||||
if (NS_WARN_IF(NS_FAILED(rv))) {
|
|
||||||
return rv;
|
|
||||||
}
|
|
||||||
|
|
||||||
nsChildProcessMIMEInfo* handlerInfo =
|
|
||||||
new nsChildProcessMIMEInfo(aScheme, nsMIMEInfoBase::eProtocolInfo);
|
|
||||||
NS_ENSURE_TRUE(handlerInfo, NS_ERROR_OUT_OF_MEMORY);
|
|
||||||
NS_ADDREF(*aRetVal = handlerInfo);
|
|
||||||
|
|
||||||
if (!*aFound) {
|
|
||||||
// Code that calls this requires an object no matter whether the OS has
|
|
||||||
// something for us, so we return the empty object.
|
|
||||||
return NS_OK;
|
|
||||||
}
|
|
||||||
|
|
||||||
nsAutoString description;
|
|
||||||
rv = GetApplicationDescription(aScheme, description);
|
|
||||||
NS_WARNING_ASSERTION(NS_SUCCEEDED(rv), "GetApplicationDescription failed");
|
|
||||||
handlerInfo->SetDefaultDescription(description);
|
|
||||||
return NS_OK;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
nsresult nsOSHelperAppServiceChild::GetFileTokenForPath(
|
nsresult nsOSHelperAppServiceChild::GetFileTokenForPath(
|
||||||
|
|
Загрузка…
Ссылка в новой задаче