Closed Bug 476082 Opened 15 years ago Closed 15 years ago

trap() on JSOP_TYPEOF causes "typeof x" to throw ReferenceError incorrectly

Categories

(Core :: JavaScript Engine, defect)

x86
macOS
defect
Not set
minor

Tracking

()

RESOLVED WORKSFORME

People

(Reporter: jruderman, Assigned: igor)

References

Details

(Keywords: testcase)

js> f = function() { typeof x; }
function () {
    typeof x;
}

js> f()

js> dis(f)
flags: LAMBDA INTERPRETED
main:
00000:  name "x"
00003:  typeof         <-- trap will go here
00004:  pop
00005:  stop

Source notes:

js> trap(f, 3, '')
js> f()
typein:1: ReferenceError: x is not defined
Assignee: general → igor
function f() {
  typeof x;
}
trap(f, 3, '');
f();

Patch v2 in bug 463239 fixes this.
Depends on: 463239
WFM.  Fixed by the patch in bug 476082, I guess.
Status: NEW → RESOLVED
Closed: 15 years ago
Resolution: --- → WORKSFORME
You need to log in before you can comment on or make changes to this bug.