Bug 202969 - Add support to TextStream for dumping HashMap<> and HashSet<>
Summary: Add support to TextStream for dumping HashMap<> and HashSet<>
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Simon Fraser (smfr)
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2019-10-14 21:26 PDT by Simon Fraser (smfr)
Modified: 2019-10-19 11:41 PDT (History)
9 users (show)

See Also:


Attachments
Patch (3.40 KB, patch)
2019-10-14 21:27 PDT, Simon Fraser (smfr)
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Simon Fraser (smfr) 2019-10-14 21:26:26 PDT
Add support to TextStream for dumping HashMap<> and HashSet<>
Comment 1 Simon Fraser (smfr) 2019-10-14 21:27:45 PDT
Created attachment 380960 [details]
Patch
Comment 2 Dean Jackson 2019-10-15 13:42:24 PDT
Comment on attachment 380960 [details]
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*
Comment 3 WebKit Commit Bot 2019-10-19 11:40:43 PDT
Comment on attachment 380960 [details]
Patch

Clearing flags on attachment: 380960

Committed r251325: <https://trac.webkit.org/changeset/251325>
Comment 4 WebKit Commit Bot 2019-10-19 11:40:45 PDT
All reviewed patches have been landed.  Closing bug.
Comment 5 Radar WebKit Bug Importer 2019-10-19 11:41:13 PDT
<rdar://problem/56436596>