[Webkit-unassigned] [Bug 9508] JavaScript Comparing a form element group to itself returns false.

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Tue Jan 23 02:09:07 PST 2007


sanjay12 at gmail.com changed:

           What    |Removed                     |Added
  Attachment #12621|                            |review?
               Flag|                            |

------- Comment #3 from sanjay12 at gmail.com  2007-01-23 02:09 PDT -------
Created an attachment (id=12621)
 --> (http://bugs.webkit.org/attachment.cgi?id=12621&action=view)
proposed fix

Weighing the options, the posted patch is probably the best way to solve the
issue at hand given all the factors.

While it certainly would be possible to cache requests for form groups in the
HTMLFormElement, the issue becomes that if we don't cache every single unique
request for the life of the HTMLFormElement, then you potentially could have a
comparison occur much later that fails when it shouldn't. However, having a
cache which only removes elements once the HTMLFormElement gets destroyed would
add memory overhead. The comments surrounding DOMNameNodesCollection seemed to
imply that it would be too costly to have them persist for long periods of

We could change how form elements are stored internally, so the group lookup
doesn't have to create a temporary object, but it would probably end up
touching a great deal of code.

With the solution used in the patch, for 99% of the equality comparisons,
there'll be no discernable speed effect, and it also gives some flexibility to
quickly fix similar problems in other areas, if they pop up.

I tested this change with both the LayoutTests and javascriptcore tests, and no
regressions are introduced by this patch.

Also included is a test case for future regression testing.

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

More information about the webkit-unassigned mailing list