Closed
Bug 476066
Opened 16 years ago
Closed 16 years ago
trap() on getxprop changes behavior of "a += 1"
Categories
(Core :: JavaScript Engine, defect)
Tracking
()
RESOLVED
FIXED
People
(Reporter: jruderman, Unassigned)
References
Details
(Keywords: testcase)
js> f = function () { return a += 1; }
function () {
return a += 1;
}
js> dis(f);
flags: LAMBDA INTERPRETED
main:
00000: bindname "a"
00003: dup
00004: getxprop "a" <-- trap is going to go here
00007: one
00008: add
00009: setname "a"
00012: return
00013: stop
Source notes:
0: 8 [ 8] xdelta
1: 8 [ 0] assignop
js> f();
typein:1: ReferenceError: reference to undefined property "a"
js> trap(f,4,'');
js> f();
NaN
Comment 1•16 years ago
|
||
function f() { a += 1; }
trap(f, 4, '');
try {
f();
print('FAIL');
} catch (e) {
print('PASS');
}
The patch in bug 463239 fixes this.
Depends on: 463239
Reporter | ||
Comment 2•16 years ago
|
||
Yep, this is fixed.
Status: NEW → RESOLVED
Closed: 16 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•