Closed Bug 416353 Opened 18 years ago Closed 4 years ago

Error in a setter under JSOP_SETNAME generates bogus error messages

Categories

(Core :: JavaScript Engine, defect)

defect
Not set
normal

Tracking

()

RESOLVED INVALID

People

(Reporter: igor, Unassigned)

References

Details

[This is a spin of of the bug 385133] Consider the following test case: this.x setter = Object.prototype.watch; function f() { x = 1; } f(); It is execution under the js shell generates an exception: ~/m/ff/mozilla/js/src $ ./Linux_All_DBG.OBJ/js ~/m/y.js /home/igor/m/y.js:4: TypeError: x is not a function An exception is expected here. "x = 1" will invoke the watch function as a setter via watch.call(this, 1) when the function expects the second argument which should be a function. But the text of the exception is misleading and it would be nice to report the real source of the error. The error message is generated during decompilation of bindname "x" one setname "x" when GetOff from jsopcode.c invokes recursively js_DecompileValueGenerator at http://lxr.mozilla.org/seamonkey/source/js/src/jsopcode.c#794 . The comment before GetOff indicates that such recursion is a recovery procedure and indicates a bug in the decompiler. As such it can be related to bad error message.
Version: unspecified → Trunk
Assignee: general → nobody

Object.prototype.watch and old setter functions -> INVALID.

Status: NEW → RESOLVED
Closed: 4 years ago
Resolution: --- → INVALID
You need to log in before you can comment on or make changes to this bug.