зеркало из https://github.com/mozilla/pjs.git
Bug #63193 --> if we can't find a protocol handler for the specified scheme then create the default protocol handler
and use it instead. sr=rpotts
This commit is contained in:
Родитель
8c691734e3
Коммит
7433fb66e9
|
@ -222,7 +222,14 @@ nsIOService::GetProtocolHandler(const char* scheme, nsIProtocolHandler* *result)
|
|||
|
||||
rv = nsServiceManager::GetService(buf, NS_GET_IID(nsIProtocolHandler), (nsISupports **)result);
|
||||
if (NS_FAILED(rv))
|
||||
return NS_ERROR_UNKNOWN_PROTOCOL;
|
||||
{
|
||||
// okay we don't have a protocol handler to handle this url type, so use the default protocol handler.
|
||||
// this will cause urls to get dispatched out to the OS ('cause we can't do anything with them) when
|
||||
// we try to read from a channel created by the default protocol handler.
|
||||
|
||||
rv = nsServiceManager::GetService(NS_NETWORK_PROTOCOL_CONTRACTID_PREFIX"default", NS_GET_IID(nsIProtocolHandler), (nsISupports **)result);
|
||||
if (NS_FAILED(rv)) return NS_ERROR_UNKNOWN_PROTOCOL;
|
||||
}
|
||||
|
||||
CacheProtocolHandler(scheme, *result);
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче