diff --git a/dom/url/URL.cpp b/dom/url/URL.cpp index 37fa97e58803..c9300bbd8110 100644 --- a/dom/url/URL.cpp +++ b/dom/url/URL.cpp @@ -243,7 +243,9 @@ URLMainThread::Constructor(nsISupports* aParent, const nsAString& aURL, nsCOMPtr 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(aURL); return nullptr; }