[webkit-reviews] review denied: [Bug 30765] Nightly build of Safari and Chrome 4 remove two functions registered to window.onload event when calling removeEventListener to remove the first one of them. : [Attachment 41864] patch v1 for re-traversing the listener vector when it's changed in a event listener handle

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Mon Oct 26 07:42:37 PDT 2009


Darin Adler <darin at apple.com> has denied johnnyding
<johnnyding.webkit at gmail.com>'s request for review:
Bug 30765: Nightly build of Safari and Chrome 4 remove two functions registered
to window.onload event when calling removeEventListener to remove the first one
of them.
https://bugs.webkit.org/show_bug.cgi?id=30765

Attachment 41864: patch v1 for re-traversing the listener vector when it's
changed in a event listener handle
https://bugs.webkit.org/attachment.cgi?id=41864&action=review

------- Additional Comments from Darin Adler <darin at apple.com>
Thanks for taking this on!

There is no need to add this extra looping to solve the problem.

A better way to fix this is follow the style already used in the code. We just
need to change FiringEventEndIterator to have pointers to both "i" and "end"
and have it decrease "i" as well as "end" if the listener being removed is
before the index.

There are also some minor style problems with this code: Some of the code is
indented two spaces and "old_end" is the wrong style for WebKit.

And the patch needs to include a regression test for the tests directory as
well as a bug fix.


More information about the webkit-reviews mailing list