зеркало из https://github.com/mozilla/pjs.git
Fix case where FillContentHandlerProperties incorrectly returns NS_ERROR_FAILURE (bug 389446), r+sr=bzbarsky
This commit is contained in:
Родитель
ef609f004b
Коммит
b7d97bd209
|
@ -865,11 +865,11 @@ nsresult nsExternalHelperAppService::FillContentHandlerProperties(
|
||||||
return NS_ERROR_OUT_OF_MEMORY;
|
return NS_ERROR_OUT_OF_MEMORY;
|
||||||
}
|
}
|
||||||
|
|
||||||
rv = aHandlerInfo->SetPreferredApplicationHandler(handlerApp);
|
return aHandlerInfo->SetPreferredApplicationHandler(handlerApp);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
// if we got here, there's no path name in the RDF graph, so this must
|
// maybe we've get a uri template, which would indicate that this is a
|
||||||
// be a web app
|
// web-handler
|
||||||
FillLiteralValueFromTarget(externalAppNodeResource, kNC_UriTemplate,
|
FillLiteralValueFromTarget(externalAppNodeResource, kNC_UriTemplate,
|
||||||
&stringValue);
|
&stringValue);
|
||||||
if (stringValue && stringValue[0]) {
|
if (stringValue && stringValue[0]) {
|
||||||
|
@ -879,14 +879,13 @@ nsresult nsExternalHelperAppService::FillContentHandlerProperties(
|
||||||
if (!handlerApp) {
|
if (!handlerApp) {
|
||||||
return NS_ERROR_OUT_OF_MEMORY;
|
return NS_ERROR_OUT_OF_MEMORY;
|
||||||
}
|
}
|
||||||
rv = aHandlerInfo->SetPreferredApplicationHandler(handlerApp);
|
return aHandlerInfo->SetPreferredApplicationHandler(handlerApp);
|
||||||
} else {
|
|
||||||
return NS_ERROR_FAILURE; // no path name _and_ no uri template
|
|
||||||
}
|
}
|
||||||
|
// otherwise, no handler at all; fall through to return NS_OK
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return rv;
|
return NS_OK;
|
||||||
}
|
}
|
||||||
#endif /* MOZ_RDF */
|
#endif /* MOZ_RDF */
|
||||||
|
|
||||||
|
|
Загрузка…
Ссылка в новой задаче