Title: [254818] trunk
- Revision
- 254818
- Author
- [email protected]
- Date
- 2020-01-20 02:59:08 -0800 (Mon, 20 Jan 2020)
Log Message
Make isValidUserAgentHeaderValue GLib only
https://bugs.webkit.org/show_bug.cgi?id=206475
Patch by Rob Buis <[email protected]> on 2020-01-20
Reviewed by Youenn Fablet.
Source/WebCore:
The function isValidUserAgentHeaderValue is only used
by code that requires GLib, so move it behind USE(GLIB).
* platform/network/HTTPParsers.cpp:
* platform/network/HTTPParsers.h:
Tools:
Make the unit test that tests isValidUserAgentHeaderValue
depend on USE(GLIB) as well.
* TestWebKitAPI/Tests/WebCore/HTTPParsers.cpp:
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (254817 => 254818)
--- trunk/Source/WebCore/ChangeLog 2020-01-20 10:39:00 UTC (rev 254817)
+++ trunk/Source/WebCore/ChangeLog 2020-01-20 10:59:08 UTC (rev 254818)
@@ -1,3 +1,16 @@
+2020-01-20 Rob Buis <[email protected]>
+
+ Make isValidUserAgentHeaderValue GLib only
+ https://bugs.webkit.org/show_bug.cgi?id=206475
+
+ Reviewed by Youenn Fablet.
+
+ The function isValidUserAgentHeaderValue is only used
+ by code that requires GLib, so move it behind USE(GLIB).
+
+ * platform/network/HTTPParsers.cpp:
+ * platform/network/HTTPParsers.h:
+
2020-01-20 youenn fablet <[email protected]>
Add support for MediaStream video track rendering in GPUProcess
Modified: trunk/Source/WebCore/platform/network/HTTPParsers.cpp (254817 => 254818)
--- trunk/Source/WebCore/platform/network/HTTPParsers.cpp 2020-01-20 10:39:00 UTC (rev 254817)
+++ trunk/Source/WebCore/platform/network/HTTPParsers.cpp 2020-01-20 10:59:08 UTC (rev 254818)
@@ -200,6 +200,7 @@
return true;
}
+#if USE(GLIB)
// True if the character at the given position satisifies a predicate, incrementing "pos" by one.
// Note: Might return pos == str.length()
static inline bool skipCharacter(const String& value, unsigned& pos, WTF::Function<bool(const UChar)>&& predicate)
@@ -306,6 +307,7 @@
return pos == value.length();
}
+#endif
static const size_t maxInputSampleSize = 128;
static String trimInputSample(const char* p, size_t length)
Modified: trunk/Source/WebCore/platform/network/HTTPParsers.h (254817 => 254818)
--- trunk/Source/WebCore/platform/network/HTTPParsers.h 2020-01-20 10:39:00 UTC (rev 254817)
+++ trunk/Source/WebCore/platform/network/HTTPParsers.h 2020-01-20 10:59:08 UTC (rev 254818)
@@ -72,7 +72,9 @@
bool isValidHTTPHeaderValue(const String&);
bool isValidAcceptHeaderValue(const String&);
bool isValidLanguageHeaderValue(const String&);
+#if USE(GLIB)
WEBCORE_EXPORT bool isValidUserAgentHeaderValue(const String&);
+#endif
bool isValidHTTPToken(const String&);
Optional<WallTime> parseHTTPDate(const String&);
String filenameFromHTTPContentDisposition(const String&);
Modified: trunk/Tools/ChangeLog (254817 => 254818)
--- trunk/Tools/ChangeLog 2020-01-20 10:39:00 UTC (rev 254817)
+++ trunk/Tools/ChangeLog 2020-01-20 10:59:08 UTC (rev 254818)
@@ -1,3 +1,15 @@
+2020-01-20 Rob Buis <[email protected]>
+
+ Make isValidUserAgentHeaderValue GLib only
+ https://bugs.webkit.org/show_bug.cgi?id=206475
+
+ Reviewed by Youenn Fablet.
+
+ Make the unit test that tests isValidUserAgentHeaderValue
+ depend on USE(GLIB) as well.
+
+ * TestWebKitAPI/Tests/WebCore/HTTPParsers.cpp:
+
2020-01-20 Takashi Komori <[email protected]>
KeyedDecoderGeneric crashes when it accesses data with non-existing key
Modified: trunk/Tools/TestWebKitAPI/Tests/WebCore/HTTPParsers.cpp (254817 => 254818)
--- trunk/Tools/TestWebKitAPI/Tests/WebCore/HTTPParsers.cpp 2020-01-20 10:39:00 UTC (rev 254817)
+++ trunk/Tools/TestWebKitAPI/Tests/WebCore/HTTPParsers.cpp 2020-01-20 10:59:08 UTC (rev 254818)
@@ -56,6 +56,7 @@
EXPECT_TRUE(parseCrossOriginResourcePolicyHeader("") == CrossOriginResourcePolicy::Invalid);
}
+#if USE(GLIB)
TEST(HTTPParsers, ValidateUserAgentValues)
{
EXPECT_TRUE(isValidUserAgentHeaderValue("Safari"));
@@ -85,5 +86,6 @@
EXPECT_FALSE(isValidUserAgentHeaderValue("WPE\\ WebKit (quoted pair in token)"));
EXPECT_FALSE(isValidUserAgentHeaderValue("/123 (missing product token)"));
}
+#endif
} // namespace TestWebKitAPI
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes