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

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

Issue 143313002: Implement URLSearchParams. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: More tests + ref count unattached URLSearchParams objects Created 6 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
Index: Source/core/dom/DOMURL.cpp
diff --git a/Source/core/dom/DOMURL.cpp b/Source/core/dom/DOMURL.cpp
index 8881223f72445c4d4933110e6246154d56d8229f..655de39b6bcc286bb44608ce2f70b06011647a95 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(this);
}
void DOMURL::setInput(const String& value)
@@ -61,6 +66,7 @@ void DOMURL::setInput(const String& value)
m_url = KURL();
m_input = value;
}
+ DOMURLUtils::update(this);
}
String DOMURL::createObjectURL(ExecutionContext* executionContext, Blob* blob)

Powered by Google App Engine
This is Rietveld 408576698