Bug 138024

Summary: Get rid of unnecessary vtables in WebKit
Product: WebKit Reporter: Chris Dumez <cdumez>
Component: WebKit Misc.Assignee: Chris Dumez <cdumez>
Status: RESOLVED FIXED    
Severity: Normal CC: benjamin, commit-queue, darin, kling, koivisto
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch none

Description Chris Dumez 2014-10-23 14:59:03 PDT
Get rid of unnecessary vtables in WebKit by de-virtualizing destructors when possible and marking the class as final to make sure people don't subclass it.
Comment 1 Chris Dumez 2014-10-23 15:01:13 PDT
Created attachment 240370 [details]
Patch
Comment 2 WebKit Commit Bot 2014-10-23 16:30:37 PDT
Comment on attachment 240370 [details]
Patch

Clearing flags on attachment: 240370

Committed r175149: <http://trac.webkit.org/changeset/175149>
Comment 3 WebKit Commit Bot 2014-10-23 16:30:42 PDT
All reviewed patches have been landed.  Closing bug.
Comment 4 Alexey Proskuryakov 2014-10-23 20:10:18 PDT
Comment on attachment 240370 [details]
Patch

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

> Source/WebCore/css/WebKitCSSMatrix.h:39
> +class WebKitCSSMatrix final : public ScriptWrappable, public RefCounted<WebKitCSSMatrix> {

We should probably give ScriptWrappable a protected destructor to make it safer.
Comment 5 Chris Dumez 2014-10-23 20:30:21 PDT
(In reply to comment #4)
> Comment on attachment 240370 [details]
> Patch
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=240370&action=review
> 
> > Source/WebCore/css/WebKitCSSMatrix.h:39
> > +class WebKitCSSMatrix final : public ScriptWrappable, public RefCounted<WebKitCSSMatrix> {
> 
> We should probably give ScriptWrappable a protected destructor to make it
> safer.

Good idea, I'll follow-up on this.