[webkit-reviews] review granted: [Bug 202969] Add support to TextStream for dumping HashMap<> and HashSet<> : [Attachment 380960] Patch

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Tue Oct 15 13:42:24 PDT 2019


Dean Jackson <dino at apple.com> has granted Simon Fraser (smfr)
<simon.fraser at apple.com>'s request for review:
Bug 202969: Add support to TextStream for dumping HashMap<> and HashSet<>
https://bugs.webkit.org/show_bug.cgi?id=202969

Attachment 380960: Patch

https://bugs.webkit.org/attachment.cgi?id=380960&action=review




--- Comment #2 from Dean Jackson <dino at apple.com> ---
Comment on attachment 380960
  --> https://bugs.webkit.org/attachment.cgi?id=380960
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=380960&action=review

> Source/WTF/wtf/text/TextStream.h:181
> +    if (item)
> +	   return ts << item.value();

Shouldn't this make it clear that it was an optional value? e.g. item.value()
<< "<Opt>" or something?

> Source/WTF/wtf/text/TextStream.h:207
> +    for (const auto& keyValuePair : map) {

Wish there were forEach-like functions on Hash*


More information about the webkit-reviews mailing list