Bug 225840

Summary: StructureRareData::m_replacementWatchpointSets should not be a pointer to a pointer
Product: WebKit Reporter: Geoffrey Garen <ggaren>
Component: New BugsAssignee: Geoffrey Garen <ggaren>
Status: RESOLVED FIXED    
Severity: Normal CC: darin, ews-watchlist, fpizlo, keith_miller, mark.lam, msaboff, nham, saam, tzagallo, webkit-bug-importer, ysuzuki
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
See Also: https://bugs.webkit.org/show_bug.cgi?id=225984
https://bugs.webkit.org/show_bug.cgi?id=226068
Attachments:
Description Flags
Patch
mark.lam: review+, ews-feeder: commit-queue-
Patch for landing none

Description Geoffrey Garen 2021-05-14 20:37:00 PDT
StructureRareData::m_replacementWatchpointSets should not be a pointer t o a pointer
Comment 1 Geoffrey Garen 2021-05-14 20:38:49 PDT
Created attachment 428705 [details]
Patch
Comment 2 Mark Lam 2021-05-14 20:47:28 PDT
Comment on attachment 428705 [details]
Patch

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

r=me

> Source/JavaScriptCore/runtime/StructureRareData.h:130
>      typedef HashMap<PropertyOffset, RefPtr<WatchpointSet>, WTF::IntHash<PropertyOffset>, WTF::UnsignedWithZeroKeyHashTraits<PropertyOffset>> PropertyWatchpointMap;

nit: maybe add `static_assert(sizeof(PropertyWatchpointMap) == sizeof(void*));` after this line?
Comment 3 Geoffrey Garen 2021-05-17 16:22:40 PDT
Created attachment 428888 [details]
Patch for landing
Comment 4 Geoffrey Garen 2021-05-17 16:23:11 PDT
Comment on attachment 428888 [details]
Patch for landing

CQ+
Comment 5 EWS 2021-05-17 17:42:08 PDT
Committed r277620 (237835@main): <https://commits.webkit.org/237835@main>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 428888 [details].
Comment 6 Radar WebKit Bug Importer 2021-05-17 17:43:25 PDT
<rdar://problem/78130993>
Comment 7 Darin Adler 2021-05-17 18:54:35 PDT
Maybe HashMap should make itself allergic to allocation on the heap. It does WTF_MAKE_FAST_ALLOCATED, but it should be WTF_MAKE_DONT_DO_IT_DONT_PUT_ME_IN_A_HEAP_BLOCK_ALL_BY_MYSELF. Same for HashTableConstIterator, HashTableIterator, HashTable, HashSet, and ListHashSet. All of these are so small it is silly to put them on the heap, I think.
Comment 8 Darin Adler 2021-05-19 14:35:16 PDT
Working on this in bug 225984.