Bug 1262948 - Remove warning from URL constructor. r=baku

Remove warning if constructing a new URI fails. An exception is still thrown on failure.
This commit is contained in:
Eric Rahm 2016-08-15 11:16:25 -07:00
Родитель 114e020c41
Коммит ee9ba04219
1 изменённых файлов: 3 добавлений и 1 удалений

Просмотреть файл

@ -243,7 +243,9 @@ URLMainThread::Constructor(nsISupports* aParent, const nsAString& aURL,
nsCOMPtr<nsIURI> uri;
nsresult rv = NS_NewURI(getter_AddRefs(uri), aURL, nullptr, aBase,
nsContentUtils::GetIOService());
if (NS_WARN_IF(NS_FAILED(rv))) {
if (NS_FAILED(rv)) {
// No need to warn in this case. It's common to use the URL constructor
// to determine if a URL is valid and an exception will be propagated.
aRv.ThrowTypeError<MSG_INVALID_URL>(aURL);
return nullptr;
}