Summary: | Clean up FontPlatformData::hash() | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Myles C. Maxfield <mmaxfield> | ||||||||||
Component: | New Bugs | Assignee: | Myles C. Maxfield <mmaxfield> | ||||||||||
Status: | RESOLVED DUPLICATE | ||||||||||||
Severity: | Normal | ||||||||||||
Priority: | P2 | ||||||||||||
Version: | WebKit Nightly Build | ||||||||||||
Hardware: | Unspecified | ||||||||||||
OS: | Unspecified | ||||||||||||
Attachments: |
|
Description
Myles C. Maxfield
2016-08-19 12:58:09 PDT
Created attachment 286470 [details]
Patch
Created attachment 286520 [details]
Patch
Created attachment 286521 [details]
Patch
Comment on attachment 286521 [details] Patch Attachment 286521 [details] did not pass mac-debug-ews (mac): Output: http://webkit-queues.webkit.org/results/1903880 Number of test failures exceeded the failure limit. Created attachment 286523 [details]
Archive of layout-test-results from ews116 for mac-yosemite
The attached test failures were seen while running run-webkit-tests on the mac-debug-ews.
Bot: ews116 Port: mac-yosemite Platform: Mac OS X 10.10.5
Comment on attachment 286521 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=286521&action=review > Source/WebCore/platform/graphics/cocoa/FontPlatformDataCocoa.mm:61 > +unsigned FontPlatformData::hash() const > +{ > + uintptr_t flags = static_cast<uintptr_t>(m_isHashTableDeletedValue << 5 | m_textRenderingMode << 3 | m_orientation << 2 | m_syntheticBold << 1 | m_syntheticOblique); > + uintptr_t fontHash = reinterpret_cast<uintptr_t>(m_font.get()); > + uintptr_t hashCodes[3] = { fontHash, m_widthVariant, flags }; > + return StringHasher::hashMemory<sizeof(hashCodes)>(hashCodes); > +} This doesn’t look right. The hash function should hash the same things that the is-equal function compares. Yet this is hashing things that platformIsEqual does not even look at. Can that really be correct? *** This bug has been marked as a duplicate of bug 167061 *** |