Bug 249295

Summary: Add size assert for Element
Product: WebKit Reporter: Rob Buis <rbuis>
Component: DOMAssignee: Rob Buis <rbuis>
Status: RESOLVED FIXED    
Severity: Normal CC: cdumez, cmarcelo, commit-queue, esprehn+autocc, ews-watchlist, kangil.han, simon.fraser, webkit-bug-importer, ysuzuki
Priority: P2 Keywords: InRadar
Version: Safari 15   
Hardware: Unspecified   
OS: Unspecified   
Bug Depends on: 249874    
Bug Blocks:    
Attachments:
Description Flags
Patch none

Description Rob Buis 2022-12-14 02:24:27 PST
Add size assert for Element based on the FIXME in Element.h
Comment 1 Rob Buis 2022-12-14 02:30:54 PST
Created attachment 464036 [details]
Patch
Comment 2 Rob Buis 2022-12-14 05:10:17 PST
Pull request: https://github.com/WebKit/WebKit/pull/7604
Comment 3 Radar WebKit Bug Importer 2022-12-21 02:25:17 PST
<rdar://problem/103591863>
Comment 4 EWS 2022-12-22 05:21:44 PST
Committed 258238@main (80db98e4cb00): <https://commits.webkit.org/258238@main>

Reviewed commits have been landed. Closing PR #7604 and removing active labels.
Comment 5 WebKit Commit Bot 2022-12-24 16:41:17 PST
Re-opened since this is blocked by bug 249874
Comment 6 Rob Buis 2022-12-29 10:31:42 PST
Pull request: https://github.com/WebKit/WebKit/pull/8102
Comment 7 EWS 2022-12-31 00:25:20 PST
Committed 258366@main (763cf9e589db): <https://commits.webkit.org/258366@main>

Reviewed commits have been landed. Closing PR #8102 and removing active labels.
Comment 8 Simon Fraser (smfr) 2022-12-31 12:44:23 PST
Comment on attachment 464036 [details]
Patch

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

> Source/WebCore/dom/Element.cpp:151
> +struct SameSizeAsElement : public ContainerNode {

This doesn't detect when ContainerNode grows (and it has no size check).
Comment 9 Rob Buis 2022-12-31 14:44:46 PST
Comment on attachment 464036 [details]
Patch

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

>> Source/WebCore/dom/Element.cpp:151
>> +struct SameSizeAsElement : public ContainerNode {
> 
> This doesn't detect when ContainerNode grows (and it has no size check).

I have a follow up patch for asserting Element base class sizes, as suggested by Sam on slack, will put it up tomorrow.
Comment 10 Yusuke Suzuki 2023-01-01 09:28:35 PST
Note that we are not seeing Speedometer2 regression with the relanded revised change (using EventTargetFlag).