RESOLVED FIXED Bug 31827
Allow custom memory allocation control for classes of the plugins and rendering directory in WebCore
https://bugs.webkit.org/show_bug.cgi?id=31827
Summary Allow custom memory allocation control for classes of the plugins and renderi...
Zoltan Horvath
Reported 2009-11-24 05:26:13 PST
Created attachment 43761 [details] Patch Reviewed by NOBODY (OOPS!). Allow custom memory allocation control for classes of the plugins and rendering directory in WebCore https://bugs.webkit.org/show_bug.cgi?id= Inherits the following classes from Noncopyable because these are instantiated by 'new' and no need to be copyable: class/struct name - instantiated at: WebCore/'location' class PluginRequest - plugins/PluginView.cpp:521 class PluginMainThreadScheduler - plugins/PluginMainThreadScheduler.cpp:34 class PluginDatabase - plugins/PluginDatabase.cpp:50 struct MimeClassInfo - plugins/PluginInfoStore.cpp:50 struct PluginInfo - plugins/PluginInfoStore.cpp:40 class RenderArena - dom/Document.cpp:1401 class RenderImageScaleData - rendering/RenderImage.cpp:149 class TableLayout - (its child class) rendering/RenderTable.cpp:82 struct ColumnInfo - rendering/RenderBlock.cpp:3590 struct FloatingObject - rendering/RenderBlock.cpp:2300 struct MaxMargin - rendering/RenderBlock.cpp:4794 class RenderMarquee - rendering/RenderLayer.cpp:3277 * plugins/PluginData.h: * plugins/PluginDatabase.h: * plugins/PluginMainThreadScheduler.h: * plugins/PluginView.h: * rendering/RenderArena.h: * rendering/RenderBlock.cpp: * rendering/RenderBlock.h: * rendering/RenderImage.cpp: * rendering/RenderMarquee.h: * rendering/TableLayout.h:
Attachments
Patch (7.22 KB, patch)
2009-11-24 05:26 PST, Zoltan Horvath
eric: review+
Eric Seidel (no email)
Comment 1 2009-11-24 10:15:25 PST
Comment on attachment 43761 [details] Patch I expect we're increasing the size of the WebCore binary by adding all these template instantiations. That said, this change looks right, and is useful for documenting the use of these classes. I'm still not sure I fully understand your quest to make new/delete replaceable, but this change is a good one.
Zoltan Horvath
Comment 2 2009-11-24 23:46:34 PST
> I'm still not sure I fully understand > your quest to make new/delete replaceable, but this change is a good one. Unfortunately, the global operator new technique doesn't work (on Linux and Windows). When you use the WebKit as a shared library for an application it will customizes the application's new/delete also. This can lead to weird problems. (e.g. crash) The FastAllocBase solution provides a safety way to customize new/delete through locally in the classes, not by the global way. So, we'll have full allocation control over the classes. I'm going to land the patch now, thanks for the review. :)
Zoltan Horvath
Comment 3 2009-11-25 00:29:27 PST
Note You need to log in before you can comment on or make changes to this bug.