Side navigation
#12606 closed bug (fixed)
Opened September 25, 2012 03:51PM UTC
Closed October 14, 2012 04:07PM UTC
window.watch() called as pattern
Reported by: | poreilly@afilias.info | Owned by: | gibson042 |
---|---|---|---|
Priority: | undecided | Milestone: | None |
Component: | unfiled | Version: | 1.8.2 |
Keywords: | Cc: | ||
Blocked by: | Blocking: |
Description
The following variable can sometimes pull a reference to window.watch() from the sizzle cache when used in Gecko (not causing an issue in Presto or Webkit)
var pattern = classCache[ expando ][ className ];
Adding a validation that the variable pattern is not a function on line 4263 resolves the issue.
if ( !pattern || typeof(pattern)=='function') {
Attachments (0)
Change History (4)
Changed September 25, 2012 04:45PM UTC by comment:1
owner: | → poreilly@afilias.info |
---|---|
status: | new → pending |
Changed September 29, 2012 05:41PM UTC by comment:2
owner: | poreilly@afilias.info → gibson042 |
---|---|
status: | pending → assigned |
Thanks for the detailed report! This bug was caused by Sizzle cache keys matching Object.prototype
properties (and so not limited to Gecko except by coincidence here), and will be fixed by https://github.com/jquery/sizzle/pull/157 .
Can you provide a reduced test case in jsFiddle.net please?
I am assuming it's calling this Firefox-specific debugging function but it would be helpful to know how it got there. https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/Object/watch