Closed Bug 131610 Opened 23 years ago Closed 23 years ago

Javascript ignores redeclaration of "reserved" function

Categories

(Core :: Security: CAPS, defect)

x86
Windows 98
defect
Not set
normal

Tracking

()

VERIFIED DUPLICATE of bug 117707

People

(Reporter: bugzilla, Assigned: security-bugs)

Details

(Keywords: testcase)

Attachments

(1 file)

BuildID 2002031608, Win 98. This is perhaps invalid, but the behaviour change the last week or so: I have a JavaScript where I wrote a wrapper for a "moveBy" function (to support older netscape browsers). With my current build I get now the message "Error: uncaught exception: Permission denied to set property Window.moveBy" on the console although this used to work and still works on other browser around. Note that as a sideeffect the complete javascript is ignored. To produce: 1. Load testcase (to come) 2a. Note error on console 2b. Note that the alert() is completely ignored. I know that there's an easy workaround: rename function moveBy() to e.g. function myMoveBy() but thats not good, as myMoveBy() could be implemented (who knows) in javascript2.0 or 3.6 or X.Y.... breaking my scripts again. The second point is: Do we really need to ignore the scripts (and the possible valid definitions of other functions) if ONE function has a reserved name?
Keywords: testcase
Stop of execution of script is a maybe a dup of bug 122866.
Reassigning to Browser-General until we can get more information. The reported error is a browser error, not a JS Engine error. This WORKSFORME with Mozilla trunk binaries from 2002-03-14, 2002-03-17. Sebastian: the error you are reporting would occur if you have any special settings in Edit > Preferences > Advanced > Scripts & Windows. Are all the checkboxes checked there? If not, you'll get the error. If that doesn't work try the test with a new profile. To do this, launch Mozilla from the command line as follows: [(path to Mozilla)] ./mozilla.exe -profilemanager When the Profile Manager comes up, there's a button called "Create Profile". I'll bet that with the new Profile, the testcase works. Does it?
Assignee: rogerl → asa
Component: JavaScript Engine → Browser-General
QA Contact: pschwartau → doronr
Summary: Javascript completely ignore on redeclaration of "reserved" function → Javascript ignores redeclaration of "reserved" function
Wait a minute, the reported error: "Error: uncaught exception: Permission denied to set property Window.moveBy" does not sound like its controlled by the Scripts & Windows pref. Instead, this sounds similar to bug 99454 "Permission denied to set property Window.scriptglobals". Reassigning to Security:CAPS for further triage. Although, as I reported above, the testcase WORKSFORME. But perhaps there is something about Sebastian's profile that makes it fail for him - (?)
Assignee: asa → mstoltz
Component: Browser-General → Security: CAPS
QA Contact: doronr → bsharma
Ok, I tested with a new profile which worked, but disabling "move or resize existing windows" and restarting (!) showed up the problem as reported. Because of that necessary restart I though the problem is independent of "scripts & windows" preferences.
Sebastian: thanks, you've found the problem! This bug is a therefore a duplicate of bug 117707, "Disabling "Change status bar text" and/or "Cookie" prefs for JS breaks applications". We mistakenly generate an error in the JS Console when a JS action contradicts a pref setting the user has made. In this case, the moveBy() function contradicts the disabled pref for "move or resize existing windows". But we shouldn't be generating an error. That is bug 117707. Thank you; you are now cc'ed on the other bug so you can follow its progress. *** This bug has been marked as a duplicate of 117707 ***
Status: UNCONFIRMED → RESOLVED
Closed: 23 years ago
Resolution: --- → DUPLICATE
jepp.
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: