Index: Source/core/dom/DOMURL.cpp |
diff --git a/Source/core/dom/DOMURL.cpp b/Source/core/dom/DOMURL.cpp |
index feba9b94942173c044ff9ce77be4eed4920b3582..366ee3c036f183c34f1edfa4d2f087c0fc101de1 100644 |
--- a/Source/core/dom/DOMURL.cpp |
+++ b/Source/core/dom/DOMURL.cpp |
@@ -43,12 +43,17 @@ namespace WebCore { |
DOMURL::DOMURL(const String& url, const KURL& base, ExceptionState& exceptionState) |
{ |
ScriptWrappable::init(this); |
- if (!base.isValid()) |
+ if (!base.isValid()) { |
exceptionState.throwDOMException(SyntaxError, "Invalid base URL"); |
+ return; |
+ } |
m_url = KURL(base, url); |
- if (!m_url.isValid()) |
+ if (!m_url.isValid()) { |
exceptionState.throwDOMException(SyntaxError, "Invalid URL"); |
+ return; |
+ } |
+ DOMURLUtils::update(); |
} |
void DOMURL::setInput(const String& value) |
@@ -61,6 +66,7 @@ void DOMURL::setInput(const String& value) |
m_url = KURL(); |
m_input = value; |
} |
+ DOMURLUtils::update(); |
} |
String DOMURL::createObjectURL(ExecutionContext* executionContext, Blob* blob, ExceptionState& exceptionState) |
@@ -103,4 +109,9 @@ void DOMURL::revokeObjectUUID(ExecutionContext* executionContext, const String& |
executionContext->publicURLManager().revoke(uuid); |
} |
+void DOMURL::trace(Visitor* visitor) |
+{ |
+ DOMURLUtils::trace(visitor); |
+} |
+ |
} // namespace WebCore |