Bug Tracker

Opened 9 years ago

Closed 9 years ago

Last modified 9 years ago

#6865 closed bug (invalid)

Firefox - infinite loop: 'elem.ownerDocument.defaultView' is null

Reported by: smitka Owned by:
Priority: Milestone: 1.4.3
Component: unfiled Version: 1.4.2
Keywords: firefox loop Cc:
Blocked by: Blocking:

Description

Some plugins (eg. PrettyPhoto) cause an infinite loop of errors in Firefox (tested on 3.6.4 and 3.6.8).

The problem is on line 4691 (jquery-1.4.2.js):

var defaultView = elem.ownerDocument.defaultView; if ( !defaultView ) { return null; } var computedStyle = defaultView.getComputedStyle( elem, null );

There must be a test if elem.ownerDocument is not null.

Simple workaround is to rewrite code to:

var defaultView = elem.ownerDocument; if ( !defaultView ) { return null; } defaultView=defaultView.defaultView; if ( !defaultView ) { return null; } var computedStyle = defaultView.getComputedStyle( elem, null );

Change History (2)

comment:1 Changed 9 years ago by dmethvin

Resolution: invalid
Status: newclosed

Please reopen with a test case. It sounds like the plugins may be passing invalid information to jQuery methods. If so, the proposed fix will mask those errors and make it harder to debug the code on the page.

comment:2 Changed 9 years ago by anonymous

harder to debug ? is there anything harder to debug ? i don't think so...

Note: See TracTickets for help on using tickets.