Closed Bug 425763 Opened 17 years ago Closed 17 years ago

javascript interpreter problem, after updating from 2.0.0.12 to 2.0.0.13

Categories

(Core :: JavaScript Engine, defect)

1.8 Branch
x86
Windows XP
defect
Not set
normal

Tracking

()

RESOLVED WONTFIX

People

(Reporter: luiggi.zamol, Unassigned)

References

Details

User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.13) Gecko/20080311 Firefox/2.0.0.13 Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.13) Gecko/20080311 Firefox/2.0.0.13 - administrative application - main page opens a popup(calendar) - in popup every day has a link:<a href="#" onClick="opener.setDate('addDocForm','dataDoc',2008,03,1);self.close();">1</a> - in main page is this function: function setDate(form,field,y,m,d){ document.eval(form).eval(field).value=y+'-'+m+'-'+d;} - and after this update I get this in error console: Error: document.eval is not a function Source File: http://www.xxxxxxxxx.xxx/tasks/index.php Line: 189 - and popup doesn't close Reproducible: Always Steps to Reproduce: 1.see Details 2. 3. Actual Results: see Details Expected Results: on Firefox 2.0.0.12 it worked, on Firefox 1.5.x.x(don't remember complete version I use on my office PC) it works. seems eval isn't reconized anymore
Assignee: nobody → general
Component: Software Update → JavaScript Engine
Depends on: 382509
Product: Firefox → Core
QA Contact: software.update → general
Version: unspecified → 1.8 Branch
We back-ported a change to conform to ECMA-262 and remove an extension from 1995 (obj.eval(str) for any object obj can delegate to Object.prototype.eval). eval is a global function now. Notice that it was never required to use document.eval(form) here. Computed names of properties are expressed using document[form], e.g. So the fix, which should work in all browsers (I hope), would be document[form][field].value=.... /be
Status: UNCONFIRMED → RESOLVED
Closed: 17 years ago
Resolution: --- → WONTFIX
We had security fixes that depended on removing the old eval-as-universal-method quirk, I should have noted. This was not just done for standards purity and that would not be sufficient reason to back-port to a patch release of Firefox 2. But Firefox 3 has the change to restrict eval to be a global function, as well. And no other browser has eval as a method of Object.prototype, so the best course is to change the code. So this bug could be reopened and morphed into a TE bug -- please advise, bugzilla gurus. /be
You need to log in before you can comment on or make changes to this bug.