[Webkit-unassigned] [Bug 103772] Teach OwnPtr and RefPtr to understand Arena'd objects

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Sat Dec 1 11:13:50 PST 2012


https://bugs.webkit.org/show_bug.cgi?id=103772





--- Comment #3 from Maciej Stachowiak <mjs at apple.com>  2012-12-01 11:16:10 PST ---
(In reply to comment #2)
> It appears we already do this:
> 
> RenderArena* renderArena() const { return document()->renderArena(); }
> 
> void RenderObject::destroy()
> {
>     willBeDestroyed();
>     arenaDelete(renderArena(), this);
> }
> 
> So then OwnPtrRenderObject just needs:
> 
> template <> void deleteOwnedPtr<RenderObject>(RenderObject* object)
> {
>     if (object)
>         object->destroy();
> }
> 
> Unless I'm missing something.

Yes, I think that would be sufficient to use OwnPtr and PassOwnPtr for RenderObjects. There might be other arena-allocated Render* types that don't inherit from RenderObject though.

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the webkit-unassigned mailing list