[webkit-reviews] review granted: [Bug 7065] refactor and simplify ChildFrame in preparation for removal : [Attachment 6242] the cleanup

bugzilla-request-daemon at opendarwin.org bugzilla-request-daemon at opendarwin.org
Sat Feb 4 08:20:54 PST 2006


Darin Adler <darin at apple.com> has granted Maciej Stachowiak <mjs at apple.com>'s
request for review:
Bug 7065: refactor and simplify ChildFrame in preparation for removal
http://bugzilla.opendarwin.org/show_bug.cgi?id=7065

Attachment 6242: the cleanup
http://bugzilla.opendarwin.org/attachment.cgi?id=6242&action=edit

------- Additional Comments from Darin Adler <darin at apple.com>
Looks great. r=me

When reviewing this I saw some minor issues in the old code.

When going from the render tree to the DOM tree, I recommend using node()
rather than element(). Despite the misleading names of these two functions, the
differences between the two are:

    1) element() returns 0 if the RenderObject is anonymous
    2) element() is overriden in derived classes to return an object of the
right type for convenience to avoid the need to cast

So in MacFrame::createFrame I would be using renderer->node(), since we don't
need the null checks.

I'm wondering about this (old) code:

+    // Some JS code in the load event may have destroyed the plugin, in that
case, abort
+    if (!child->m_renderer)
+	 return false;

What guarantees in this case that the child pointer is still good?



More information about the webkit-reviews mailing list