Closed Bug 586152 Opened 14 years ago Closed 14 years ago

eval checks if the outer window is global

Categories

(Core :: JavaScript Engine, defect)

x86_64
Linux
defect
Not set
normal

Tracking

()

RESOLVED FIXED

People

(Reporter: mrbkap, Assigned: mrbkap)

References

Details

(Whiteboard: [compartments] fixed-in-tracemonkey)

Attachments

(1 file)

Attached patch Proposed fix (deleted) — Splinter Review
In order to allow |window.eval()|, eval needs to innerize the 'this' object before checking for globalness.
Attachment #464678 - Flags: review?(jorendorff)
Comment on attachment 464678 [details] [diff] [review] Proposed fix I think it's safe to move the existing OBJ_TO_INNER_OBJECT call (just before the following use of obj) to this point instead of duplicating it. The comment says "Ban all indirect uses", but that disagrees with the code, which issues a warning. Fix the comment while you're here?
Attachment #464678 - Flags: review?(jorendorff) → review+
That comment lies. Really, I do not think we should throw EvalError, but this is a separate bug. Fixing the comment here would be good, though. /be
Whiteboard: [compartments]
Assignee: general → mrbkap
Whiteboard: [compartments] → [compartments] fixed-in-tracemonkey
Status: NEW → RESOLVED
Closed: 14 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: