Title: [246906] trunk/Source/WTF
- Revision
- 246906
- Author
- [email protected]
- Date
- 2019-06-27 14:36:11 -0700 (Thu, 27 Jun 2019)
Log Message
Avoid using WTF::Function for passing local function pointers and closures in URLHelpers.cpp
https://bugs.webkit.org/show_bug.cgi?id=199271
Reviewed by Yusuke Suzuki.
WTF::Function allocates memory on heap, which is totally redundant in this
case.
* wtf/URLHelpers.cpp:
(WTF::URLHelpers::isSecondLevelDomainNameAllowedByTLDRules):
Modified Paths
Diff
Modified: trunk/Source/WTF/ChangeLog (246905 => 246906)
--- trunk/Source/WTF/ChangeLog 2019-06-27 21:11:13 UTC (rev 246905)
+++ trunk/Source/WTF/ChangeLog 2019-06-27 21:36:11 UTC (rev 246906)
@@ -1,3 +1,16 @@
+2019-06-27 Konstantin Tokarev <[email protected]>
+
+ Avoid using WTF::Function for passing local function pointers and closures in URLHelpers.cpp
+ https://bugs.webkit.org/show_bug.cgi?id=199271
+
+ Reviewed by Yusuke Suzuki.
+
+ WTF::Function allocates memory on heap, which is totally redundant in this
+ case.
+
+ * wtf/URLHelpers.cpp:
+ (WTF::URLHelpers::isSecondLevelDomainNameAllowedByTLDRules):
+
2019-06-27 Timothy Hatcher <[email protected]>
Move WebKitLegacy off of a couple AppKit ivars.
Modified: trunk/Source/WTF/wtf/URLHelpers.cpp (246905 => 246906)
--- trunk/Source/WTF/wtf/URLHelpers.cpp 2019-06-27 21:11:13 UTC (rev 246905)
+++ trunk/Source/WTF/wtf/URLHelpers.cpp 2019-06-27 21:36:11 UTC (rev 246906)
@@ -327,7 +327,8 @@
return true;
}
-static bool isSecondLevelDomainNameAllowedByTLDRules(const UChar* buffer, int32_t length, const WTF::Function<bool(UChar)>& characterIsAllowed)
+template<typename Func>
+static inline bool isSecondLevelDomainNameAllowedByTLDRules(const UChar* buffer, int32_t length, Func characterIsAllowed)
{
ASSERT(length > 0);
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes