Skip to main content

Bug Tracker

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 dmethvin comment:1

owner: → poreilly@afilias.info
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

Changed September 29, 2012 05:41PM UTC by gibson042 comment:2

owner: poreilly@afilias.infogibson042
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 .

Changed October 05, 2012 01:18PM UTC by dmethvin comment:3

#12658 is a duplicate of this ticket.

Changed October 14, 2012 04:07PM UTC by Timmy Willison comment:4

resolution: → fixed
status: assignedclosed

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

Changeset: 077989e8c0c56ed059bffeb504cfd201e6c5c9cf