Bug Tracker

Opened 7 years ago

Closed 7 years ago

#12606 closed bug (fixed)

window.watch() called as pattern

Reported by: poreilly@… 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') {

Change History (4)

comment:1 Changed 7 years ago by dmethvin

Owner: set to poreilly@…
Status: newpending

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

comment:2 Changed 7 years ago by gibson042

Owner: changed from poreilly@… to gibson042
Status: pendingassigned

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 .

comment:3 Changed 7 years ago by dmethvin

#12658 is a duplicate of this ticket.

comment:4 Changed 7 years ago by Timmy Willison

Resolution: fixed
Status: assignedclosed

Update Sizzle: Fixes #12606, #12671, #12672.

Changeset: 077989e8c0c56ed059bffeb504cfd201e6c5c9cf

Note: See TracTickets for help on using tickets.