Inherits the following classes from FastAllocBase because these are instantiated by 'new': class AnimationList - instantiated at WebCore/rendering/style/StyleRareNonInheritedData.cpp:85 class Color - instantiated at WebCore/rendering/RenderTheme.cpp:48 struct Length - instantiated at WebCore/platform/Length.cpp:103 class PlatformKeyboardEvent - instantiated at WebCore/dom/KeyboardEvent.cpp:63 class ContextMenuItem - instantiated at WebCore/platform/ContextMenu.cpp:70 class DeprecatedPtrList - instantiated at WebCore/rendering/RenderBlock.cpp:2284 Inherits the following classes from Noncopyable because these are instantiated by 'new' and no need to be copyable: class GraphicsContextPrivate - instantiated at WebCore/platform/graphics/GraphicsContext.cpp:78 class FontCache - instantiated at WebCore/platform/graphics/qt/FontCacheQt.cpp:43 struct MediaPlayerFactory - instantiated at WebCore/platform/graphics/MediaPlayer.cpp:163
Created attachment 43155 [details] proposed patch
Created attachment 43156 [details] proposed patch
Comment on attachment 43156 [details] proposed patch > - class ContextMenuItem { > + class ContextMenuItem : public FastAllocBase { Should be Noncopyable instead. > - class PlatformKeyboardEvent { > + class PlatformKeyboardEvent : public FastAllocBase { I think this should be Noncopyable instead. Needs testing to be sure. review- because we'd like keep direct FastAllocBase use to a minimum and use Noncopyable whenever appropriate.
(In reply to comment #3) > (From update of attachment 43156 [details]) > > - class ContextMenuItem { > > + class ContextMenuItem : public FastAllocBase { > > Should be Noncopyable instead. It can't be Noncopyable because WebCore/platform/qt/ContextMenuQt.cpp:51 m_items.append(item); copies a ContextMenuItem instance. > > - class PlatformKeyboardEvent { > > + class PlatformKeyboardEvent : public FastAllocBase { > > I think this should be Noncopyable instead. Needs testing to be sure. > > review- because we'd like keep direct FastAllocBase use to a minimum and use > Noncopyable whenever appropriate. The PlatformKeyboardEvent's problem comes from WebCore/dom/KeyboardEvent.cpp:63 it would use its copy constructor.
Btw, I analyzed all classes in the patch, and if a class is inherited from FastAllocBase than it won't compile with Noncopyable some reason.
Comment on attachment 43156 [details] proposed patch I mark it to r? again.
Landed in 51149. http://trac.webkit.org/changeset/51149