| Index: third_party/WebKit/Source/platform/weborigin/KURL.cpp
|
| diff --git a/third_party/WebKit/Source/platform/weborigin/KURL.cpp b/third_party/WebKit/Source/platform/weborigin/KURL.cpp
|
| index c81f2d3a3eff09c385138a0a2d350b98e191248b..dddb316f098d21d8fdcd2795f9a8aa0619b7b76f 100644
|
| --- a/third_party/WebKit/Source/platform/weborigin/KURL.cpp
|
| +++ b/third_party/WebKit/Source/platform/weborigin/KURL.cpp
|
| @@ -305,6 +305,10 @@ bool KURL::hasPort() const {
|
| return hostEnd() < pathStart();
|
| }
|
|
|
| +bool KURL::protocolIsJavaScript() const {
|
| + return componentStringView(m_parsed.scheme) == "javascript";
|
| +}
|
| +
|
| bool KURL::protocolIsInHTTPFamily() const {
|
| return m_protocolIsInHTTPFamily;
|
| }
|
| @@ -778,6 +782,7 @@ void KURL::init(const KURL& base,
|
|
|
| initProtocolMetadata();
|
| initInnerURL();
|
| + DCHECK(!::blink::protocolIsJavaScript(m_string) || protocolIsJavaScript());
|
| }
|
|
|
| void KURL::initInnerURL() {
|
| @@ -828,7 +833,7 @@ bool KURL::protocolIs(const char* protocol) const {
|
| }
|
|
|
| StringView KURL::stringViewForInvalidComponent() const {
|
| - return m_string.isNull() ? StringView() : StringView("", 0);
|
| + return m_string.isNull() ? StringView() : StringView(StringImpl::empty());
|
| }
|
|
|
| StringView KURL::componentStringView(const url::Component& component) const {
|
|
|