Bug Tracker

Opened 11 years ago

Closed 9 years ago

#4251 closed bug (fixed)

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.diff (2.5 KB) - added by metaweta 11 years ago.
Patch fixing the bug.
jquery.2.diff (2.3 KB) - added by metaweta 11 years ago.
Patch for events.js removing the use of arguments.callee
remove_arguments_callee.diff (2.0 KB) - added by brandon 11 years ago.
updated patch

Download all attachments as: .zip

Change History (9)

Changed 11 years ago by metaweta

Attachment: jquery.diff added

Patch fixing the bug.

comment:1 Changed 11 years ago by john

Component: unfilledcore
Resolution: fixed
Status: newclosed

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

Changed 11 years ago by metaweta

Attachment: jquery.2.diff added

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

comment:2 Changed 11 years ago by metaweta

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.

comment:3 Changed 11 years ago by metaweta

Resolution: fixed
Status: closedreopened

comment:4 Changed 11 years ago by brandon

Component: coreevent
Owner: set to brandon
Status: reopenednew

Changed 11 years ago by brandon

updated patch

comment:5 Changed 11 years ago by brandon

Status: newassigned

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

comment:6 Changed 9 years ago by dmethvin

Resolution: fixed
Status: assignedclosed

Fixed in 1.4.

Note: See TracTickets for help on using tickets.