Bug 46523

Summary: Use WTF::StringHasher in WTF::CaseFoldingHash
Product: WebKit Reporter: Patrick R. Gansterer <paroga>
Component: Web Template FrameworkAssignee: Patrick R. Gansterer <paroga>
Status: RESOLVED FIXED    
Severity: Normal CC: abarth, commit-queue, eric, evan, thakis, webkit-ews, webkit.review.bot
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: All   
OS: All   
Attachments:
Description Flags
Patch
none
Patch none

Description Patrick R. Gansterer 2010-09-24 14:58:44 PDT
see patch
Comment 1 Patrick R. Gansterer 2010-09-24 15:01:29 PDT
Created attachment 68762 [details]
Patch
Comment 2 Early Warning System Bot 2010-09-24 16:15:03 PDT
Attachment 68762 [details] did not build on qt:
Build output: http://queues.webkit.org/results/4038129
Comment 3 Patrick R. Gansterer 2010-10-06 12:16:04 PDT
Created attachment 69977 [details]
Patch
Comment 4 WebKit Commit Bot 2010-10-10 13:19:57 PDT
Comment on attachment 69977 [details]
Patch

Clearing flags on attachment: 69977

Committed r69472: <http://trac.webkit.org/changeset/69472>
Comment 5 WebKit Commit Bot 2010-10-10 13:20:02 PDT
All reviewed patches have been landed.  Closing bug.
Comment 6 WebKit Review Bot 2010-10-10 14:35:34 PDT
http://trac.webkit.org/changeset/69472 might have broken Chromium Win Release
Comment 7 Evan Martin 2010-10-11 15:15:08 PDT
This fails on our Clang buildbots.

 CXX(target) out/Debug/obj.target/wtf/third_party/WebKit/JavaScriptCore/wtf/WTFThreadData.o
In file included from
third_party/WebKit/JavaScriptCore/wtf/text/AtomicString.cpp:25:
third_party/WebKit/JavaScriptCore/wtf/text/StringHash.h:107:52:error:
'foldCase' is a private member of 'WTF::CaseFoldingHash'
           return StringHasher::createHash<UChar, foldCase<UChar>
>(data, length);
                                                  ^~~~~~~~~~~~~~~
In file included from
third_party/WebKit/JavaScriptCore/wtf/text/AtomicString.cpp:23:
In file included from
third_party/WebKit/JavaScriptCore/wtf/text/AtomicString.h:24:
In file included from
third_party/WebKit/JavaScriptCore/wtf/text/AtomicStringImpl.h:24:
In file included from
third_party/WebKit/JavaScriptCore/wtf/text/StringImpl.h:32:
third_party/WebKit/JavaScriptCore/wtf/StringHashFunctions.h:91:69:
note: while substituting explicitly-specified template arguments into
function template 'createHash'
   template<typename T, UChar Converter(T)> static inline unsigned
createHash(const T* data, unsigned length)
                                                                   ^

Clang is much more picky about C++ language laws.  I think since you really are using this function from outside of the class, the function should maybe be public.
Comment 8 Adam Barth 2010-10-11 15:19:32 PDT
> This fails on our Clang buildbots.

How hard is it to set up a clank build of WebKit?  We could either set up a buildbot or an EWS bot to catch these things automatically.
Comment 9 Nico Weber 2010-10-11 15:21:40 PDT
abarth: It's pretty easy, see http://code.google.com/p/chromium/wiki/Clang
Comment 10 Patrick R. Gansterer 2010-10-11 15:24:30 PDT
(In reply to comment #7)
> Clang is much more picky about C++ language laws.  I think since you really are using this function from outside of the class, the function should maybe be public.

Does changing foldCase to public fix the problem?

(In reply to comment #8)
> How hard is it to set up a clank build of WebKit?  We could either set up a buildbot or an EWS bot to catch these things automatically.
+1
Comment 11 Nico Weber 2010-10-11 16:17:44 PDT
(In reply to comment #10)
> (In reply to comment #7)
> > Clang is much more picky about C++ language laws.  I think since you really are using this function from outside of the class, the function should maybe be public.
> 
> Does changing foldCase to public fix the problem?

Yes.
Comment 12 Patrick R. Gansterer 2010-10-11 16:31:31 PDT
(In reply to comment #11)
> (In reply to comment #10)
> > (In reply to comment #7)
> > > Clang is much more picky about C++ language laws.  I think since you really are using this function from outside of the class, the function should maybe be public.
> > 
> > Does changing foldCase to public fix the problem?
> 
> Yes.

Committed r69535: <http://trac.webkit.org/changeset/69535>