зеркало из https://github.com/mozilla/gecko-dev.git
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:
Родитель
114e020c41
Коммит
ee9ba04219
|
@ -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;
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче