Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(725)

Unified Diff: Source/core/dom/DOMURL.cpp

Issue 870053004: Make URL constructor failure throw TypeError (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Change test expectation Created 5 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « LayoutTests/fast/domurl/url-constructor.html ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/dom/DOMURL.cpp
diff --git a/Source/core/dom/DOMURL.cpp b/Source/core/dom/DOMURL.cpp
index 73d98252de81650a7b0c5330d1b92da5e0edb7ed..299b635cf419428bcd26d9882d0a7e136c0dbe6b 100644
--- a/Source/core/dom/DOMURL.cpp
+++ b/Source/core/dom/DOMURL.cpp
@@ -43,11 +43,11 @@ namespace blink {
DOMURL::DOMURL(const String& url, const KURL& base, ExceptionState& exceptionState)
{
if (!base.isValid())
- exceptionState.throwDOMException(SyntaxError, "Invalid base URL");
+ exceptionState.throwTypeError("Invalid base URL");
m_url = KURL(base, url);
if (!m_url.isValid())
- exceptionState.throwDOMException(SyntaxError, "Invalid URL");
+ exceptionState.throwTypeError("Invalid URL");
}
void DOMURL::setInput(const String& value)
« no previous file with comments | « LayoutTests/fast/domurl/url-constructor.html ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698