Closed
Bug 667646
Opened 13 years ago
Closed 13 years ago
(function f() { alert("" + f.caller); })() should alert null, not undefined
Categories
(Core :: JavaScript Engine, defect)
Core
JavaScript Engine
Tracking
()
RESOLVED
FIXED
mozilla8
People
(Reporter: Waldo, Assigned: Waldo)
Details
(Whiteboard: fixed-in-tracemonkey)
Attachments
(1 file)
5.00 KB,
patch
|
evilpie
:
review+
|
Details | Diff | Splinter Review |
3.6 alerted null. 4.0, 5.0, and presumably everything since alerts undefined. This contradicts my understanding of the property and our documentation, so we should go back to 3.6-era behavior: https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Function/caller If I had to guess, the changeset that introduce getValidCalleeObject (which I'm pretty sure I reviewed!) probably regressed this, but I don't really care enough to verify that or bisect a true regressor.
Attachment #542299 -
Flags: review?(evilpies)
Comment 1•13 years ago
|
||
Comment on attachment 542299 [details] [diff] [review] Patch, plus tests for bug 666587 Review of attachment 542299 [details] [diff] [review]: ----------------------------------------------------------------- I really like that we lost one level of indention here. I am not sure how much we care about getValidCalleeObject, but it looks like it was more or less created for ".caller", so i it should be okay to change the return value. ::: js/src/tests/ecma_5/extensions/function-properties.js @@ +8,5 @@ > +} > + > +assertEq(foo.arguments, null); > +assertEq(foo.caller, null); > +foo(); Check foo.caller and foo.arguments.length here again. Just for the sake of it :)
Attachment #542299 -
Flags: review?(evilpies) → review+
Assignee | ||
Comment 2•13 years ago
|
||
http://hg.mozilla.org/tracemonkey/rev/3fb152290879
Whiteboard: fixed-in-tracemonkey
Comment 3•13 years ago
|
||
cdleary-bot mozilla-central merge info: http://hg.mozilla.org/mozilla-central/rev/3fb152290879
Updated•13 years ago
|
Status: ASSIGNED → RESOLVED
Closed: 13 years ago
Resolution: --- → FIXED
Target Milestone: mozilla7 → mozilla8
You need to log in
before you can comment on or make changes to this bug.
Description
•