WebKit Bugzilla
Attachment 373041 Details for
Bug 199271
: Avoid using WTF::Function for passing local function pointers and closures in URLHelpers.cpp
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch
bug-199271-20190627215335.patch (text/plain), 1.48 KB, created by
Konstantin Tokarev
on 2019-06-27 11:53:37 PDT
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
Konstantin Tokarev
Created:
2019-06-27 11:53:37 PDT
Size:
1.48 KB
patch
obsolete
>Subversion Revision: 246878 >diff --git a/Source/WTF/ChangeLog b/Source/WTF/ChangeLog >index 551941649c3637cd1591388eb0003f8dfbdcd0a2..0c4e30be6a1dddd9aeaf713cd171b44cdcc74356 100644 >--- a/Source/WTF/ChangeLog >+++ b/Source/WTF/ChangeLog >@@ -1,3 +1,16 @@ >+2019-06-27 Konstantin Tokarev <annulen@yandex.ru> >+ >+ 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 NOBODY (OOPS!). >+ >+ WTF::Function allocates memory on heap, which is totally redundant in this >+ case. >+ >+ * wtf/URLHelpers.cpp: >+ (WTF::URLHelpers::isSecondLevelDomainNameAllowedByTLDRules): >+ > 2019-06-27 Fujii Hironori <Hironori.Fujii@sony.com> > > [CMake] Bump cmake_minimum_required version to 3.10 >diff --git a/Source/WTF/wtf/URLHelpers.cpp b/Source/WTF/wtf/URLHelpers.cpp >index 64004acaab30dff37c2ee0ba64af7b42a32a6d59..8927156e23451c3fd5f3ff85cc545560fc44a4d4 100644 >--- a/Source/WTF/wtf/URLHelpers.cpp >+++ b/Source/WTF/wtf/URLHelpers.cpp >@@ -327,7 +327,8 @@ static bool allCharactersInIDNScriptWhiteList(const UChar* buffer, int32_t lengt > 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); >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 199271
:
373026
| 373041