Bug Tracker

Opened 12 years ago

Closed 12 years ago

#1781 closed bug (fixed)

Javascript Warnings (javascript.options.strict)

Reported by: Byron Owned by:
Priority: minor Milestone: 1.2.2
Component: core Version: 1.2.1
Keywords: strict, warnings, firefox Cc:
Blocked by: Blocking:

Description

jQuery 1.2.1 is throwing a lot of warnings in firefox when javascript.options.strict = true

This causes a considerable slow-down when users have the setting turned on, firebug installed and set it to show javascript warnings ( http://dean.edwards.name/weblog/2007/08/firebug-slow/ )

fortunately for us, the number of warnings that get thrown when jquery loads is under 10, however if some measure is not put into place (eg, making all core developers test with the setting turned on and pay attention to the warnings) jquery will eventually run into the same problems dean ran into with base2.

(The following warning messages are copied directly from the console)


Warning: variable val hides argument
Source File: http://code.jquery.com/jquery-latest.js
Line: 320, Column: 11
Source Code:
var val = jQuery.browser.msie && !option.attributesvalue?.specified ? option.text : option.value;


Warning: anonymous function does not always return a value
Source File: http://code.jquery.com/jquery-latest.js
Line: 355, Column: 1
Source Code:
},


Warning: anonymous function does not always return a value
Source File: http://code.jquery.com/jquery-latest.js
Line: 1886, Column: 1
Source Code:
},


Warning: anonymous function does not always return a value
Source File: http://code.jquery.com/jquery-latest.js
Line: 2397, Column: 12
Source Code:
return xml;


Warning: anonymous function does not always return a value
Source File: http://code.jquery.com/jquery-latest.js
Line: 2422, Column: 1
Source Code:
},


Warning: anonymous function does not always return a value
Source File: http://code.jquery.com/jquery-latest.js
Line: 2677, Column: 9
Source Code:
return q;


Warning: redeclaration of var border
Source File: http://code.jquery.com/jquery-latest.js
Line: 2983, Column: 10
Source Code:
function border(elem) {


Warning: anonymous function does not always return a value
Source File: http://code.jquery.com/jquery-latest.js
Line: 2991
Source Code:
};


Change History (1)

comment:1 Changed 12 years ago by davidserduke

need: PatchReview
Priority: majorminor
Resolution: fixed
Status: newclosed

Fixed in [4171] for warnings on parse that are mentioned in this ticket.

Note: See TracTickets for help on using tickets.