Sizzle cache collision in browsers without querySelectorAll
|Reported by:||jryans||Owned by:||timmywil|
Description (last modified by ajpiano)
In browsers without querySelectorAll (IE 6, IE 7, FF 3.0), Sizzle marks the elements it encounters as seen for a particular selection run. The value used as a marker is an integer that comes from an internal counter which is incremented before each new selection, and these markers on left on the elements after selection completes.
This causes trouble when there are two copies of Sizzle on the page. Running a selection in Sizzle copy A sets the marker on a set of elements to 0. If you then run a selection in Sizzle copy B that passes through the same elements, Sizzle will assume it is safe to use a cached value at that point, since the stored marker of 0 matches copy B's marker for this run. This gives unexpected selection results.
See http://jsfiddle.net/uz4dt/6/ for a test case. The second test fails for browsers without querySelectorAll.
Change History (18)
comment:3 Changed 5 years ago by rwaldron
- Owner set to john
- Priority changed from undecided to blocker
- Status changed from new to assigned
comment:15 Changed 5 years ago by timmywil
- Owner changed from john to timmywil
- Priority changed from blocker to high