Skip to main content

Search and Top Navigation

#5434 closed bug (fixed)

Opened March 26, 2010 02:16PM UTC

Closed July 13, 2010 01:59PM UTC

Last modified August 04, 2010 03:38AM UTC

IE 8 function undefined() - Out of Stack Space

Reported by: swago Owned by:
Priority: major Milestone: 1.8.3
Component: ui.accordion Version: 1.8
Keywords: Cc:
Blocked by: Blocking:
Description

I believe this is an bug with IE8 but it does block the accordion from working. It only happens with IE8 and because of the JQuery name spacing it should not be happening.

Defining a function named 'undefined' after the jquery library has loaded will cause an 'Out of stack space' error in IE8.

To replicate download the UI development package from jquery version 1.8 and add the following function to the end of the script block inside of the index.html file:

function undefined(){
   var undefined;
   return undefined;
}

This will not break it in any other browser(except earlier versions of IE).

To solve this we removed our function definition and replaced our checks for undefined with so we don't interfere with jquery:

(typeof(variable)=='undefined')
Attachments (1)
  • index.html (30.9 KB) - added by swago March 26, 2010 02:16PM UTC.
Change History (4)

Changed March 26, 2010 02:53PM UTC by bamccaig comment:1

I just did a little bit more checking on this and see that while jQuery seems to use a closure for undefined:

(function(window, undefined) {
    /* Define library codez here. */
}(window);

It seems jQuery UI does not do this. As a result, our undefined function may be causing simple comparisons to undefined to always fail within jQuery UI.

if(x == undefined) {
    ; // Never happens.
}

A possible solution would of course be to use an internal reference to undefined, whether returned by a function or through a closure.

Changed July 13, 2010 01:59PM UTC by scottgonzalez comment:2

milestone: TBD1.9
resolution: → fixed
status: newclosed

Fixed in 21aad10.

Changed August 04, 2010 01:23AM UTC by scottgonzalez comment:3

milestone: 1.91.8.3

Changed August 04, 2010 03:38AM UTC by bamccaig comment:4

Replying to [comment:1 bamccaig]:

I just did a little bit more checking on this and see that while jQuery seems to use a closure for undefined:

*snip*

A possible solution would of course be to use an internal reference to undefined, whether returned by a function or through a closure.

That's not a closure at all... I blame lack of sleep.