[webkit-reviews] review granted: [Bug 21818] Should be able to use AtomicString as the key for a HashMap and HashSet : [Attachment 24641] Final patch

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Fri Oct 24 12:03:30 PDT 2008


Darin Adler <darin at apple.com> has granted Simon Fraser
<simon.fraser at apple.com>'s request for review:
Bug 21818: Should be able to use AtomicString as the key for a HashMap and
HashSet
https://bugs.webkit.org/show_bug.cgi?id=21818

Attachment 24641: Final patch
https://bugs.webkit.org/attachment.cgi?id=24641&action=edit

------- Additional Comments from Darin Adler <darin at apple.com>
+	 * platform/text/AtomicString.h:
+	 (WebCore::AtomicString::AtomicString):
+	 (WebCore::AtomicString::isHashTableDeletedValue):
+	 (WTF::): specialize DefaultHash for AtomicString to use
AtomicStringHash
+	 * platform/text/AtomicStringHash.h: Added.
+	 (WebCore::AtomicStringHash::hash):
+	 (WebCore::AtomicStringHash::equal):
+	 (WTF::):

For future reference, there's no need to leave bogus things like "(WTF::)" in
the ChangeLog just because a buggy prepare-ChangeLog script put them in there!

@@ -44,6 +44,7 @@
		0A4844990CA44CB200B7BD48 /* SoftLinking.h in Headers */ = {isa
= PBXBuildFile; fileRef = 0A4844980CA44CB200B7BD48 /* SoftLinking.h */;
settings = {ATTRIBUTES = (Private, ); }; };
		0F56028F0E4B76580065B038 /* RenderMarquee.h in Headers */ =
{isa = PBXBuildFile; fileRef = 0F56028D0E4B76580065B038 /* RenderMarquee.h */;
};
		0F5602900E4B76580065B038 /* RenderMarquee.cpp in Sources */ =
{isa = PBXBuildFile; fileRef = 0F56028E0E4B76580065B038 /* RenderMarquee.cpp
*/; };
+		0FC705210EB1815600B90AD8 /* AtomicStringHash.h in Headers */ =
{isa = PBXBuildFile; fileRef = 0FC705200EB1815600B90AD8 /* AtomicStringHash.h
*/; };
		1402645E0AFDC19B005919E2 /* LoggingMac.mm in Sources */ = {isa
= PBXBuildFile; fileRef = 1402645D0AFDC19B005919E2 /* LoggingMac.mm */; };
		1403B99709EB13AF00797C7F /* DOMWindow.h in Headers */ = {isa =
PBXBuildFile; fileRef = 1403B99509EB13AF00797C7F /* DOMWindow.h */; settings =
{ATTRIBUTES = (Private, ); }; };
		1403B99809EB13AF00797C7F /* DOMWindow.cpp in Sources */ = {isa
= PBXBuildFile; fileRef = 1403B99609EB13AF00797C7F /* DOMWindow.cpp */; };
@@ -4716,6 +4717,7 @@
		0A4844980CA44CB200B7BD48 /* SoftLinking.h */ = {isa =
PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path =
SoftLinking.h; sourceTree = "<group>"; };
		0F56028D0E4B76580065B038 /* RenderMarquee.h */ = {isa =
PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path =
RenderMarquee.h; sourceTree = "<group>"; };
		0F56028E0E4B76580065B038 /* RenderMarquee.cpp */ = {isa =
PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp;
path = RenderMarquee.cpp; sourceTree = "<group>"; };
+		0FC705200EB1815600B90AD8 /* AtomicStringHash.h */ = {isa =
PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path =
AtomicStringHash.h; sourceTree = "<group>"; };
		1402645D0AFDC19B005919E2 /* LoggingMac.mm */ = {isa =
PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.objcpp;
path = LoggingMac.mm; sourceTree = "<group>"; };
		1403B90C09EB124500797C7F /* DOMWindow.idl */ = {isa =
PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path =
DOMWindow.idl; sourceTree = "<group>"; };
		1403B99509EB13AF00797C7F /* DOMWindow.h */ = {isa =
PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path =
DOMWindow.h; sourceTree = "<group>"; };

What is this change? It's not mentioned in the ChangeLog.

 {
+    hash();
 }

I think you should add a comment. Calling a function that's normally used for
its result, but just for its side effect, is unusual enough that I think you
should call it out.

r=me


More information about the webkit-reviews mailing list