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

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

Issue 143313002: Implement URLSearchParams. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Rebased Created 6 years, 4 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 | « Source/core/dom/DOMURL.h ('k') | Source/core/dom/DOMURLSearchParams.h » ('j') | 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 576a46fc6e1cff84fd191b5c9e4fabd8c8a68096..4c596475596e7c464a62ae1af54199ea1e519045 100644
--- a/Source/core/dom/DOMURL.cpp
+++ b/Source/core/dom/DOMURL.cpp
@@ -43,12 +43,17 @@ namespace blink {
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 blink
« no previous file with comments | « Source/core/dom/DOMURL.h ('k') | Source/core/dom/DOMURLSearchParams.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698