Bug Tracker

Ticket #1781 (closed bug: fixed)

Opened 11 months ago

Last modified 9 months ago

Javascript Warnings (javascript.options.strict)

Reported by: Byron Assigned to: anonymous
Type: bug Priority: minor
Milestone: 1.2.2 Component: core
Version: 1.2.1 Keywords: strict, warnings, firefox
Cc: Needs: Review

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:
};


Attachments

Change History

Changed 9 months ago by davidserduke

  • need changed from Patch to Review
  • priority changed from major to minor
  • status changed from new to closed
  • resolution set to fixed

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

Note: See TracTickets for help on using tickets.