Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(129)

Issue 7974010: compositor: Add protected virtual destructor to CompositorDelegate. (Closed)

Created:
9 years, 3 months ago by tfarina
Modified:
9 years, 3 months ago
Reviewers:
sky
CC:
chromium-reviews
Visibility:
Public.

Description

compositor: Add protected virtual destructor to CompositorDelegate. The use of a protected virtual destructor is to prevent the destruction of a derived object via a base-class pointer. That's it, CompositorDelegate should only be deleted through derived class. Example: class Delegate { public: ... protected: virtual ~Delegate() {} }; class Foo : public Delegate { }; Delegate* delegate = new Foo; delete delegate; // It should prevent this situation! R=sky@chromium.org Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=102350

Patch Set 1 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+3 lines, -0 lines) Patch
M ui/gfx/compositor/compositor.h View 1 chunk +3 lines, -0 lines 0 comments Download

Messages

Total messages: 2 (0 generated)
tfarina
9 years, 3 months ago (2011-09-22 16:32:18 UTC) #1
sky
9 years, 3 months ago (2011-09-22 17:44:15 UTC) #2
LGTM

Powered by Google App Engine
This is Rietveld 408576698