Title: [102123] trunk/Source/WebCore
- Revision
- 102123
- Author
- benja...@webkit.org
- Date
- 2011-12-06 05:04:45 -0800 (Tue, 06 Dec 2011)
Log Message
Simplify KURL's checkEncodedString()
https://bugs.webkit.org/show_bug.cgi?id=73890
Reviewed by Andreas Kling.
The method was reimplementing String::containsOnlyASCII().
Use the method from String and we can remove the #if NDEBUG.
* platform/KURL.cpp:
(WebCore::checkEncodedString):
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (102122 => 102123)
--- trunk/Source/WebCore/ChangeLog 2011-12-06 12:53:48 UTC (rev 102122)
+++ trunk/Source/WebCore/ChangeLog 2011-12-06 13:04:45 UTC (rev 102123)
@@ -1,3 +1,16 @@
+2011-12-06 Benjamin Poulain <benja...@webkit.org>
+
+ Simplify KURL's checkEncodedString()
+ https://bugs.webkit.org/show_bug.cgi?id=73890
+
+ Reviewed by Andreas Kling.
+
+ The method was reimplementing String::containsOnlyASCII().
+ Use the method from String and we can remove the #if NDEBUG.
+
+ * platform/KURL.cpp:
+ (WebCore::checkEncodedString):
+
2011-12-06 Sheriff Bot <webkit.review....@gmail.com>
Unreviewed, rolling out r102111.
Modified: trunk/Source/WebCore/platform/KURL.cpp (102122 => 102123)
--- trunk/Source/WebCore/platform/KURL.cpp 2011-12-06 12:53:48 UTC (rev 102122)
+++ trunk/Source/WebCore/platform/KURL.cpp 2011-12-06 13:04:45 UTC (rev 102123)
@@ -293,19 +293,12 @@
return -1;
}
-#ifndef NDEBUG
-static void checkEncodedString(const String& url)
+static inline void checkEncodedString(const String& url)
{
- for (unsigned i = 0; i < url.length(); ++i)
- ASSERT(!(url[i] & ~0x7F));
-
- ASSERT(!url.length() || isSchemeFirstChar(url[0]));
+ UNUSED_PARAM(url);
+ ASSERT(url.containsOnlyASCII());
+ ASSERT(!url.isEmpty() || isSchemeFirstChar(url[0]));
}
-#else
-static inline void checkEncodedString(const String&)
-{
-}
-#endif
inline bool KURL::protocolIs(const String& string, const char* protocol)
{
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes