Skip to main content

Bug Tracker

Side navigation

#4251 closed bug (fixed)

Opened February 26, 2009 12:07AM UTC

Closed June 25, 2010 03:16AM UTC

Use new when constructing RegExps and named functions instead of arguments.callee

Reported by: metaweta Owned by: brandon
Priority: major Milestone: 1.4
Component: event Version: 1.3.2
Keywords: Cc:
Blocked by: Blocking:
Description

ECMAScript 3.1 strict mode will prohibit the use of arguments.callee. Recursive anonymous functions will need to be named and invoked by name. As long as this happens within a closure, as is the case with support.js, this won't pollute the global namespace on IE.

Also, in order to make jQuery work with Caja, constructors must be invoked with new, not called directly.

Attachments (3)
  • jquery.2.diff (2.3 KB) - added by metaweta February 26, 2009 06:29PM UTC.

    Patch for events.js removing the use of arguments.callee

  • jquery.diff (2.5 KB) - added by metaweta February 26, 2009 12:08AM UTC.

    Patch fixing the bug.

  • remove_arguments_callee.diff (2.0 KB) - added by brandon May 07, 2009 02:46AM UTC.

    updated patch

Change History (6)

Changed February 26, 2009 06:01PM UTC by john comment:1

component: unfilledcore
resolution: → fixed
status: newclosed

Landed in SVN rev [6262]. Thanks for the patch!

Changed February 26, 2009 06:30PM UTC by metaweta comment:2

Sorry to reopen the bug. Somehow, I missed the uses of arguments.callee in event.js. Find attached a patch (jquery.2.diff) that fixes that.

Changed February 26, 2009 06:31PM UTC by metaweta comment:3

resolution: fixed
status: closedreopened

Changed May 07, 2009 12:15AM UTC by brandon comment:4

component: coreevent
owner: → brandon
status: reopenednew

Changed May 07, 2009 02:48AM UTC by brandon comment:5

status: newassigned

Need to make sure this doesn't bring back the memory leak referenced on line 47 of event.js before committing.

Changed June 25, 2010 03:16AM UTC by dmethvin comment:6

resolution: → fixed
status: assignedclosed

Fixed in 1.4.