Summary: | DocumentOrderedMap::containsMultiple can incorrectly return true after an item is removed | ||
---|---|---|---|
Product: | WebKit | Reporter: | Darin Adler <darin> |
Component: | DOM | Assignee: | Darin Adler <darin> |
Status: | RESOLVED FIXED | ||
Severity: | Normal | CC: | ap, dglazkov, rniwa, rolandsteiner |
Priority: | P2 | ||
Version: | 528+ (Nightly build) | ||
Hardware: | Unspecified | ||
OS: | Unspecified |
Description
Darin Adler
2012-03-04 12:10:21 PST
It looks like these problems date back to when I first created the class and were not introduced when moving it to a separate file. But the fact that the key matching functions are “baked into the class” are part of moving this to a separate file, and those did make problem B worse. A is not really a design problem! The question can be correctly answered with a different implementation. I am going to repurpose this to just deal with the correctness problem. (In reply to comment #4) > I am going to repurpose this to just deal with the correctness problem. I love it when you get back into coding. (In reply to comment #5) > I love it when you get back into coding. I only wish I had more time for it. (In reply to comment #0) > There are two related design problems in DocumentOrderedMap. > > There is a bug: DocumentOrderedMap::containsMultiple will return an incorrect result in the following case: > > 1) There are two elements in the map. > 2) The first element is removed. > 3) containsMultiple will return true, but it should return false. I'm certain http://trac.webkit.org/changeset/149652/trunk/Source/WebCore/dom/DocumentOrderedMap.h addressed this issue. |