Bug 232927

Summary: Hasher should be able to hash pointers
Product: WebKit Reporter: Antti Koivisto <koivisto>
Component: Web Template FrameworkAssignee: Antti Koivisto <koivisto>
Status: RESOLVED FIXED    
Severity: Normal CC: benjamin, cdumez, cmarcelo, ews-watchlist, kkinnunen, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Bug Depends on:    
Bug Blocks: 232930    
Attachments:
Description Flags
Patch
none
Patch for landing none

Description Antti Koivisto 2021-11-10 01:12:35 PST
Currently the implicitly convert to bool leading bad results.
Comment 1 Antti Koivisto 2021-11-10 01:25:41 PST
Created attachment 443782 [details]
Patch
Comment 2 Kimmo Kinnunen 2021-11-10 02:49:11 PST
Comment on attachment 443782 [details]
Patch

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

> Tools/TestWebKitAPI/Tests/WTF/Hasher.cpp:200
> +    EXPECT_EQ(is32Bit ? zero32BitHash : zero64BitHash, computeHash(nullPtr));

maybe use just uintptr_t, not is32Bit
Comment 3 Kimmo Kinnunen 2021-11-10 02:49:58 PST
Comment on attachment 443782 [details]
Patch

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

> Tools/TestWebKitAPI/Tests/WTF/Hasher.cpp:202
> +    EXPECT_EQ(is32Bit ? computeHash(static_cast<uint32_t>(0xffffff)) : computeHash(static_cast<uint64_t>(0xffffff)), computeHash(ffffffPtr));

maybe test 
  computeHash(nullptr) == computeHash(nullPtr)
Comment 4 Antti Koivisto 2021-11-10 03:56:31 PST
Created attachment 443796 [details]
Patch for landing
Comment 5 EWS 2021-11-10 04:49:32 PST
Committed r285572 (244080@main): <https://commits.webkit.org/244080@main>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 443796 [details].
Comment 6 Radar WebKit Bug Importer 2021-11-10 04:50:22 PST
<rdar://problem/85250129>