RESOLVED FIXED 237142
Regression(r273929) FrameState no longer gets a move constructor
https://bugs.webkit.org/show_bug.cgi?id=237142
Summary Regression(r273929) FrameState no longer gets a move constructor
Chris Dumez
Reported 2022-02-24 09:11:46 PST
FrameState no longer gets an implicit move constructor since r273929 because a custom destructor was added.
Attachments
Patch (1.64 KB, patch)
2022-02-24 09:12 PST, Chris Dumez
no flags
Patch (1.61 KB, patch)
2022-02-24 09:23 PST, Chris Dumez
no flags
Chris Dumez
Comment 1 2022-02-24 09:12:44 PST
Darin Adler
Comment 2 2022-02-24 09:16:03 PST
Comment on attachment 453106 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=453106&action=review > Source/WebKit/Shared/SessionState.h:93 > + FrameState(const FrameState&) = default; > + FrameState(FrameState&&) = default; > + FrameState& operator=(const FrameState&) = default; > + FrameState& operator=(FrameState&&) = default; I’d think we’d want the "main run loop" assertion on these other constructors too, maybe even the assignment operators, but sadly could not take advantage of the defaults then. Valuable to group these with the constructor/destructor pair, since we should delete them all at the same time.
Chris Dumez
Comment 3 2022-02-24 09:23:32 PST
Chris Dumez
Comment 4 2022-02-24 09:30:16 PST
(In reply to Darin Adler from comment #2) > Comment on attachment 453106 [details] > Patch > > View in context: > https://bugs.webkit.org/attachment.cgi?id=453106&action=review > > > Source/WebKit/Shared/SessionState.h:93 > > + FrameState(const FrameState&) = default; > > + FrameState(FrameState&&) = default; > > + FrameState& operator=(const FrameState&) = default; > > + FrameState& operator=(FrameState&&) = default; > > I’d think we’d want the "main run loop" assertion on these other > constructors too, maybe even the assignment operators, but sadly could not > take advantage of the defaults then. Valuable to group these with the > constructor/destructor pair, since we should delete them all at the same > time. I did the grouping as suggested. I am not convinced it is worth writing these by hand just to be able to add the threading assertion though.
Darin Adler
Comment 5 2022-02-24 09:41:00 PST
I have no idea how important it is to get the threading assertion right so I don’t have much of an opinion; not sure what made us add that. But I do note that adding it to the default constructor and the destructor is an inconsistent choice since it affects *some* construction and *all* destruction. Oversights like that have been a problem for me before when hunting bugs.
EWS
Comment 6 2022-02-24 11:48:53 PST
Committed r290446 (247749@main): <https://commits.webkit.org/247749@main> All reviewed patches have been landed. Closing bug and clearing flags on attachment 453108 [details].
Radar WebKit Bug Importer
Comment 7 2022-02-24 11:49:45 PST
Note You need to log in before you can comment on or make changes to this bug.