diff options
Diffstat (limited to 'src/javascript/jsc/bindings/URLDecomposition.cpp')
-rw-r--r-- | src/javascript/jsc/bindings/URLDecomposition.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/javascript/jsc/bindings/URLDecomposition.cpp b/src/javascript/jsc/bindings/URLDecomposition.cpp index eb21e36c8..84e734528 100644 --- a/src/javascript/jsc/bindings/URLDecomposition.cpp +++ b/src/javascript/jsc/bindings/URLDecomposition.cpp @@ -57,7 +57,7 @@ String URLDecomposition::username() const void URLDecomposition::setUsername(StringView user) { auto fullURL = this->fullURL(); - if (fullURL.host().isEmpty() || fullURL.cannotBeABaseURL() || fullURL.protocolIs("file")) + if (fullURL.host().isEmpty() || fullURL.cannotBeABaseURL() || fullURL.protocolIs("file"_s)) return; fullURL.setUser(user); setFullURL(fullURL); @@ -71,7 +71,7 @@ String URLDecomposition::password() const void URLDecomposition::setPassword(StringView password) { auto fullURL = this->fullURL(); - if (fullURL.host().isEmpty() || fullURL.cannotBeABaseURL() || fullURL.protocolIs("file")) + if (fullURL.host().isEmpty() || fullURL.cannotBeABaseURL() || fullURL.protocolIs("file"_s)) return; fullURL.setPassword(password); setFullURL(fullURL); @@ -95,7 +95,7 @@ static unsigned countASCIIDigits(StringView string) void URLDecomposition::setHost(StringView value) { auto fullURL = this->fullURL(); - if (value.isEmpty() && !fullURL.protocolIs("file") && fullURL.hasSpecialScheme()) + if (value.isEmpty() && !fullURL.protocolIs("file"_s) && fullURL.hasSpecialScheme()) return; size_t separator = value.reverseFind(':'); @@ -148,7 +148,7 @@ void URLDecomposition::setHostname(StringView value) { auto fullURL = this->fullURL(); auto host = removeAllLeadingSolidusCharacters(value); - if (host.isEmpty() && !fullURL.protocolIs("file") && fullURL.hasSpecialScheme()) + if (host.isEmpty() && !fullURL.protocolIs("file"_s) && fullURL.hasSpecialScheme()) return; if (fullURL.cannotBeABaseURL() || !fullURL.canSetHostOrPort()) return; @@ -195,7 +195,7 @@ static std::optional<std::optional<uint16_t>> parsePort(StringView string, Strin void URLDecomposition::setPort(StringView value) { auto fullURL = this->fullURL(); - if (fullURL.host().isEmpty() || fullURL.cannotBeABaseURL() || fullURL.protocolIs("file") || !fullURL.canSetHostOrPort()) + if (fullURL.host().isEmpty() || fullURL.cannotBeABaseURL() || fullURL.protocolIs("file"_s) || !fullURL.canSetHostOrPort()) return; auto port = parsePort(value, fullURL.protocol()); if (!port) |