Closed Bug 722669 Opened 13 years ago Closed 13 years ago

IonMonkey: function.caller is not always correct

Categories

(Core :: JavaScript Engine, defect)

defect
Not set
normal

Tracking

()

RESOLVED DUPLICATE of bug 732853

People

(Reporter: jandem, Unassigned)

References

Details

Reduced from tests/jaeger/getter-hook-2.js: -- function foo() { for (var i = 0; i < 100; i++) { } return foo.caller; } assertEq(foo(), null); -- $ ./js --ion -n test.js test.js:6: Error: Assertion failed: got function foo() {for (var i = 0; i < 100; i++) {}return foo.caller;}, expected null The GETPROP (foo.caller) runs in the interpreter. At this point there are two frames for foo on the stack, so js_GetScriptedCaller returns |foo| itself instead of its caller.
Assignee: general → christopher.leary
Status: NEW → ASSIGNED
This bug brings up a larger issue that JS_GetScriptedCaller and JS_FrameIterator are utterly incompatible with IonMonkey. We'll have to remove those API calls.
Assignee: christopher.leary → general
Depends on: 732546
Status: ASSIGNED → RESOLVED
Closed: 13 years ago
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.