Bug 138024 - Get rid of unnecessary vtables in WebKit
Summary: Get rid of unnecessary vtables in WebKit
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKit Misc. (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Chris Dumez
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-10-23 14:59 PDT by Chris Dumez
Modified: 2014-10-23 20:30 PDT (History)
5 users (show)

See Also:


Attachments
Patch (11.01 KB, patch)
2014-10-23 15:01 PDT, Chris Dumez
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
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.