Bug 40938

Summary: RetainPtr can't be used in HashMaps or HashSets
Product: WebKit Reporter: John Sullivan <sullivan>
Component: JavaScriptCoreAssignee: John Sullivan <sullivan>
Status: RESOLVED FIXED    
Severity: Normal CC: webkit.review.bot
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: All   
OS: All   
Attachments:
Description Flags
Patch that mimics COMPtr.h's handling of hashing code. aroben: review+

John Sullivan
Reported 2010-06-21 13:38:31 PDT
The RetainPtr smart pointer class can't be used in HashMaps or HashSets. It needs hashing code like that in RefPtr and COMPtr.
Attachments
Patch that mimics COMPtr.h's handling of hashing code. (3.33 KB, patch)
2010-06-21 13:43 PDT, John Sullivan
aroben: review+
John Sullivan
Comment 1 2010-06-21 13:43:35 PDT
Created attachment 59283 [details] Patch that mimics COMPtr.h's handling of hashing code.
WebKit Review Bot
Comment 2 2010-06-21 13:49:21 PDT
Attachment 59283 [details] did not pass style-queue: Failed to run "['WebKitTools/Scripts/check-webkit-style', '--no-squash']" exit_code: 1 JavaScriptCore/wtf/RetainPtr.h:219: More than one command on the same line [whitespace/newline] [4] Total errors found: 1 in 2 files If any of these errors are false positives, please file a bug against check-webkit-style.
Adam Roben (:aroben)
Comment 3 2010-06-21 13:52:17 PDT
Comment on attachment 59283 [details] Patch that mimics COMPtr.h's handling of hashing code. > +++ JavaScriptCore/wtf/RetainPtr.h (working copy) > @@ -24,6 +24,7 @@ > #include "TypeTraits.h" > #include <algorithm> > #include <CoreFoundation/CoreFoundation.h> > +#include <WTF/HashTraits.h> It looks like intra-WTF includes are supposed to use quotes and no wtf/ prefix: #include "HashTraits.h" r=me
John Sullivan
Comment 4 2010-06-21 13:58:40 PDT
The style complaint is a false positive. I filed <https://bugs.webkit.org/show_bug.cgi?id=40941>.
John Sullivan
Comment 5 2010-06-21 14:04:43 PDT
Note You need to log in before you can comment on or make changes to this bug.