[webkit-reviews] review granted: [Bug 219169] Use final in generated callback code : [Attachment 414609] Patch
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Thu Nov 19 12:59:37 PST 2020
Darin Adler <darin at apple.com> has granted Don Olmstead
<don.olmstead at sony.com>'s request for review:
Bug 219169: Use final in generated callback code
https://bugs.webkit.org/show_bug.cgi?id=219169
Attachment 414609: Patch
https://bugs.webkit.org/attachment.cgi?id=414609&action=review
--- Comment #2 from Darin Adler <darin at apple.com> ---
Comment on attachment 414609
--> https://bugs.webkit.org/attachment.cgi?id=414609
Patch
View in context: https://bugs.webkit.org/attachment.cgi?id=414609&action=review
> Source/WebCore/ChangeLog:10
> + Generated callbacks descend from ContextDestructionObserver and are
final. The
> + scriptExecutionContext method is not virtual so adding override
errors. Remove the virtual
> + for that case and mark the destructor as final.
When you put final on a destructor that seems to imply that the entire class
could be marked final. Yet I don’t see that change here.
Thrilled that we discovered that scriptExecutionContext was unnecessarily
virtual. And it’s safe if the class is indeed final. Otherwise, I worry that
some derived class might want to override.
Do you know what code uses the scriptExecutionContext function?
More information about the webkit-reviews
mailing list