[webkit-reviews] review granted: [Bug 15707] Crash when manipulating document from within an iframe onload function : [Attachment 27751] proposed fix

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Sun Feb 22 23:34:50 PST 2009


Darin Adler <darin at apple.com> has granted Alexey Proskuryakov <ap at webkit.org>'s
request for review:
Bug 15707: Crash when manipulating document from within an iframe onload
function
https://bugs.webkit.org/show_bug.cgi?id=15707

Attachment 27751: proposed fix
https://bugs.webkit.org/attachment.cgi?id=27751&action=review

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

Will this have any performance impact? I am not too happy about "protect". I
always hate those.

Could we scope the "n" variable better?

Instead of this:

    for (n = m_firstChild; n; n = n->nextSibling())

we could do this:

    for (RefPtr<Node> n = m_firstChild; n; n = n->nextSibling())

Instead of this:

    while ((n = m_firstChild) != 0) {

we could do this:

    while (RefPtr<Node> n = m_firstChild) {

I think this would give slightly smaller/faster code because construction
doesn't have to check the old value for 0.


More information about the webkit-reviews mailing list